Skip to content

Commit f9dfdc4

Browse files
committed
manifest/raw_bootc: use collectMkdirPaths in the PXE test
TestRawBootcPXE collected mkdir paths by hand. A previous commit added collectMkdirPaths for the same job, so use it here too.
1 parent e1b40ff commit f9dfdc4

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

pkg/manifest/raw_bootc_test.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,8 @@ func TestRawBootcPXE(t *testing.T) {
466466
require.NoError(t, err)
467467

468468
// Check for mkdir stages
469-
mkdirStages := findStages("org.osbuild.mkdir", pipeline.Stages)
470-
require.Greater(t, len(mkdirStages), 0)
471-
var mkdirPaths []string
472-
for _, s := range mkdirStages {
473-
opts := s.Options.(*osbuild.MkdirStageOptions)
474-
for _, p := range opts.Paths {
475-
mkdirPaths = append(mkdirPaths, p.Path)
476-
}
477-
}
469+
mkdirPaths := collectMkdirPaths(pipeline.Stages)
470+
require.NotEmpty(t, mkdirPaths)
478471
assert.Contains(t, mkdirPaths, "/usr")
479472
assert.Contains(t, mkdirPaths, "/proc")
480473
}

0 commit comments

Comments
 (0)