From 3a64402ef44f4677ea4ce67adfda8af34b375bea Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Tue, 31 Jan 2023 18:15:54 +0200 Subject: [PATCH] add fail case --- .../tests/pod/node_selector_test.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/library/common-test/tests/pod/node_selector_test.yaml b/library/common-test/tests/pod/node_selector_test.yaml index 625eef603f..84a5efe448 100644 --- a/library/common-test/tests/pod/node_selector_test.yaml +++ b/library/common-test/tests/pod/node_selector_test.yaml @@ -12,7 +12,6 @@ tests: primary: true type: CronJob schedule: "*/1 * * * *" - schedule: "*/1 * * * *" podSpec: {} asserts: - documentIndex: &cronJobDoc 0 @@ -91,3 +90,19 @@ tests: value: disk: hdd cpu: amd + # Failures + - it: should fail with empty value on nodeSelector + set: + podOptions: + nodeSelector: + disk: "" + controllers: + controller-name1: + enabled: true + primary: true + type: CronJob + schedule: "*/1 * * * *" + podSpec: {} + asserts: + - failedTemplate: + errorMessage: Expected non-empty value on [disk] key.