Skip to content

Commit

Permalink
test: fix hardware test not to require PCI devices
Browse files Browse the repository at this point in the history
On e.g. Azure VMs there are non reported.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Jun 3, 2024
1 parent 9fcc9b8 commit 3086021
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions internal/integration/api/hardware.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@ func (suite *HardwareSuite) TestSystemInformation() {
func (suite *HardwareSuite) TestHardwareInfo() {
node := suite.RandomDiscoveredNodeInternalIP()

for _, resourceType := range []resource.Type{
resourceList := []resource.Type{
hardware.MemoryModuleType,
hardware.ProcessorType,
hardware.PCIDeviceType,
} {
}

if suite.Cluster != nil {
// cloud VMs might not publish PCI devices
resourceList = append(resourceList, hardware.PCIDeviceType)
}

for _, resourceType := range resourceList {
items, err := suite.Client.COSI.List(client.WithNode(suite.ctx, node), resource.NewMetadata(hardware.NamespaceName, resourceType, "", resource.VersionUndefined))
suite.Require().NoError(err)

Expand Down

0 comments on commit 3086021

Please sign in to comment.