Skip to content

Commit

Permalink
test: fix the integration test for no META name
Browse files Browse the repository at this point in the history
When META has never been written (e.g. booted from a disk image), it
won't be detected as `talosmeta`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Jun 11, 2024
1 parent 5350063 commit d1a0c1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/integration/api/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ func (suite *VolumesSuite) testDiscoveredVolumes(node string) {
suite.Require().NoError(err)

expectedVolumes := map[string]struct {
Name string
Names []string
}{
"META": {
Name: "talosmeta",
Names: []string{"talosmeta", ""}, // if META was never written, it will not be detected
},
"STATE": {
Name: "xfs",
Names: []string{"xfs"},
},
"EPHEMERAL": {
Name: "xfs",
Names: []string{"xfs"},
},
}

Expand Down Expand Up @@ -102,7 +102,7 @@ func (suite *VolumesSuite) testDiscoveredVolumes(node string) {
}
}

suite.Assert().Equal(expected.Name, dv.TypedSpec().Name, "node: ", node)
suite.Assert().Contains(expected.Names, dv.TypedSpec().Name, "node: %s", node)

delete(expectedVolumes, id)
}
Expand Down

0 comments on commit d1a0c1f

Please sign in to comment.