From 58054ef5b6c92bd7435e46b2dd758e8cc8af1ddd Mon Sep 17 00:00:00 2001 From: Shuting Zhao Date: Mon, 4 Nov 2019 17:54:26 -0800 Subject: [PATCH] remove duplicate test --- pkg/testrunner/testrunner_test.go | 4 ---- .../scenario_validate_nonRootUser.yaml | 18 ------------------ 2 files changed, 22 deletions(-) delete mode 100644 test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml diff --git a/pkg/testrunner/testrunner_test.go b/pkg/testrunner/testrunner_test.go index 3fce4cb112..01902bf979 100644 --- a/pkg/testrunner/testrunner_test.go +++ b/pkg/testrunner/testrunner_test.go @@ -22,10 +22,6 @@ func Test_validate_healthChecks(t *testing.T) { testScenario(t, "/test/scenarios/other/scenario_validate_healthChecks.yaml") } -func Test_validate_nonRootUsers(t *testing.T) { - testScenario(t, "/test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml") -} - func Test_generate_networkPolicy(t *testing.T) { testScenario(t, "/test/scenarios/samples/best_practices/scenario_generate_networkPolicy.yaml") } diff --git a/test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml b/test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml deleted file mode 100644 index ae6e8116a3..0000000000 --- a/test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# file path relative to project root -input: - policy: samples/best_practices/deny_runasrootuser.yaml - resource: test/resources/resource_validate_nonRootUser.yaml -expected: - validation: - policyresponse: - policy: validate-deny-runasrootuser - resource: - kind: Pod - apiVersion: v1 - namespace: '' - name: sec-ctx-unprivileged - rules: - - name: deny-runasrootuser - type: Validation - message: Validation rule 'deny-runasrootuser' failed to validate patterns defined in anyPattern. Root user is not allowed. Set runAsNonRoot to true.; anyPattern[0] failed at path /spec/securityContext/; anyPattern[1] failed at path /spec/containers/0/securityContext/ - success: false \ No newline at end of file