Skip to content

Commit

Permalink
tests: no generated policy for untested platforms
Browse files Browse the repository at this point in the history
Avoid auto-generating Policy on platforms that haven"t been tested
yet with auto-generated Policy.

Support for auto-generated Policy on these additional platforms is
coming up in future PRs, so the tests being fixed here were
prematurely enabled.

Signed-off-by: Dan Mihai <[email protected]>
  • Loading branch information
danmihai1 committed Apr 23, 2024
1 parent 5d31eb4 commit e5c3f5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/integration/kubernetes/k8s-policy-job.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh"

setup() {
policy_tests_enabled || skip "Policy tests are disabled."
auto_generate_policy_enabled || skip "Auto-generated policy tests are disabled."

get_pod_config_dir

Expand Down Expand Up @@ -171,7 +171,7 @@ test_job_policy_error() {
}

teardown() {
policy_tests_enabled || skip "Policy tests are disabled."
auto_generate_policy_enabled || skip "Auto-generated policy tests are disabled."

# Debugging information
for pod_name in ${pod_names[@]}; do
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/kubernetes/k8s-policy-pod.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh"

setup() {
policy_tests_enabled || skip "Policy tests are disabled."
auto_generate_policy_enabled || skip "Auto-generated policy tests are disabled."

configmap_name="policy-configmap"
pod_name="policy-pod"
Expand Down Expand Up @@ -144,7 +144,7 @@ test_pod_policy_error() {
}

teardown() {
policy_tests_enabled || skip "Policy tests are disabled."
auto_generate_policy_enabled || skip "Auto-generated policy tests are disabled."

# Debugging information. Don't print the "Message:" line because it contains a truncated policy log.
kubectl describe pod "${pod_name}" | grep -v "Message:"
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/kubernetes/k8s-policy-rc.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh"

setup() {
policy_tests_enabled || skip "Policy tests are disabled."
auto_generate_policy_enabled || skip "Auto-generated policy tests are disabled."

replication_name="policy-rc-test"
app_name="policy-nginx-rc"
Expand Down Expand Up @@ -156,7 +156,7 @@ test_rc_policy() {
}

teardown() {
policy_tests_enabled || skip "Policy tests are disabled."
auto_generate_policy_enabled || skip "Auto-generated policy tests are disabled."

# Debugging information
kubectl describe rc "${replication_name}"
Expand Down

0 comments on commit e5c3f5f

Please sign in to comment.