Skip to content

Commit

Permalink
Hide policy tests behind LCOWIntegrity feature flag
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim An <maksiman@microsoft.com>
  • Loading branch information
anmaxvl committed Mar 14, 2022
1 parent 083d81d commit 1c2ea78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/cri-containerd/layer_integrity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func Test_LCOW_Layer_Integrity(t *testing.T) {
requireFeatures(t, featureLCOWIntegrity, featureLCOW)
requireFeatures(t, featureLCOW, featureLCOWIntegrity)

client := newTestRuntimeClient(t)
ctx, cancel := context.WithCancel(context.Background())
Expand Down Expand Up @@ -85,7 +85,7 @@ func Test_LCOW_Layer_Integrity(t *testing.T) {

// Validate that verity target(s) present
output := shimDiagExecOutput(ctx, t, podID, []string{"ls", "-l", "/dev/mapper"})
filtered := filterStrings(strings.Split(output, "\n"), fmt.Sprintf("dm-verity-%s", scenario.layerType))
filtered := filterStrings(strings.Split(output, "\n"), fmt.Sprintf("verity-%s", scenario.layerType))
if len(filtered) == 0 {
t.Fatalf("expected verity targets for %s devices, none found.\n%s\n", scenario.layerType, output)
}
Expand Down
8 changes: 4 additions & 4 deletions test/cri-containerd/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func sandboxRequestWithPolicy(t *testing.T, policy string) *runtime.RunPodSandbo
}

func Test_RunPodSandbox_WithPolicy_Allowed(t *testing.T) {
requireFeatures(t, featureLCOW)
requireFeatures(t, featureLCOW, featureLCOWIntegrity)
pullRequiredLCOWImages(t, []string{imageLcowK8sPause})

sandboxPolicy := sandboxSecurityPolicy(t)
Expand All @@ -109,7 +109,7 @@ func Test_RunPodSandbox_WithPolicy_Allowed(t *testing.T) {
}

func Test_RunSimpleAlpineContainer_WithPolicy_Allowed(t *testing.T) {
requireFeatures(t, featureLCOW)
requireFeatures(t, featureLCOW, featureLCOWIntegrity)
pullRequiredLCOWImages(t, []string{imageLcowK8sPause, imageLcowAlpine})

alpinePolicy := alpineSecurityPolicy(t)
Expand Down Expand Up @@ -147,7 +147,7 @@ func Test_RunContainer_ValidContainerConfigs_Allowed(t *testing.T) {
opts []configOpt
}

requireFeatures(t, featureLCOW)
requireFeatures(t, featureLCOW, featureLCOWIntegrity)
pullRequiredLCOWImages(t, []string{imageLcowK8sPause, imageLcowAlpine})

client := newTestRuntimeClient(t)
Expand Down Expand Up @@ -214,7 +214,7 @@ func Test_RunContainer_InvalidContainerConfigs_NotAllowed(t *testing.T) {
expectedError string
}

requireFeatures(t, featureLCOW)
requireFeatures(t, featureLCOW, featureLCOWIntegrity)
pullRequiredLCOWImages(t, []string{imageLcowK8sPause, imageLcowAlpine})

alpinePolicy := alpineSecurityPolicy(t)
Expand Down

0 comments on commit 1c2ea78

Please sign in to comment.