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 cc2bd61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 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
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 cc2bd61

Please sign in to comment.