Skip to content

Commit 1090a3b

Browse files
committed
Disable Overlay + SELinux test for AZL 3.0.
Azure Linux 3.0 has a bug where the `policy.kern` file is missing. And this results in calls to `semanage fcontext` failing, since that command expects the `policy.kern` to exist. This bug should be fixed in microsoft/azurelinux#14549. But in the meantime, disable the test.
1 parent 29d2973 commit 1090a3b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

toolkit/tools/pkg/imagecustomizerlib/customizeoverlays_test.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,21 @@ func TestCustomizeImageOverlays(t *testing.T) {
8080
}
8181

8282
func TestCustomizeImageOverlaysSELinux(t *testing.T) {
83-
baseImage, _ := checkSkipForCustomizeDefaultImage(t)
83+
for _, baseImageInfo := range baseImageAll {
84+
t.Run(baseImageInfo.Name, func(t *testing.T) {
85+
testCustomizeImageOverlaysSELinuxHelper(t, "TestCustomizeImageOverlaysSELinux"+baseImageInfo.Name, baseImageInfo)
86+
})
87+
}
88+
}
89+
90+
func testCustomizeImageOverlaysSELinuxHelper(t *testing.T, testName string, baseImageInfo testBaseImageInfo) {
91+
if baseImageInfo.Version == baseImageVersionAzl3 {
92+
t.Skip("Azure Linux 3.0 is missing policy.kern file")
93+
}
94+
95+
baseImage := checkSkipForCustomizeImage(t, baseImageInfo)
8496

85-
testTempDir := filepath.Join(tmpDir, "TestCustomizeImageOverlaysSELinux")
97+
testTempDir := filepath.Join(tmpDir, testName)
8698
buildDir := filepath.Join(testTempDir, "build")
8799
outImageFilePath := filepath.Join(testTempDir, "image.raw")
88100
configFile := filepath.Join(testDir, "overlays-selinux.yaml")

0 commit comments

Comments
 (0)