You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: e2e.bats
+29
Original file line number
Diff line number
Diff line change
@@ -7,23 +7,52 @@
7
7
[ $(expr "$output":'.*"allowed":true.*')-ne 0 ]
8
8
}
9
9
10
+
@test "Test anyIn with name only" {
11
+
run kwctl run --request-path test_data/deployment_anyin.json --settings-path test_data/settings_anyin_names_only.json annotated-policy.wasm
12
+
[ "$status"-eq 0 ]
13
+
echo"$output"
14
+
[ $(expr "$output":'.*"allowed":true.*')-ne 0 ]
15
+
}
16
+
10
17
@test "Test anyNotIn" {
11
18
run kwctl run --request-path test_data/deployment_anynotin.json --settings-path test_data/settings_anynotin.json annotated-policy.wasm
12
19
[ "$status"-eq 0 ]
13
20
echo"$output"
14
21
[ $(expr "$output":'.*"allowed":true.*')-ne 0 ]
15
22
}
16
23
24
+
@test "Test anyNotIn with names only" {
25
+
run kwctl run --request-path test_data/deployment_anynotin.json --settings-path test_data/settings_anynotin_names_only.json annotated-policy.wasm
26
+
[ "$status"-eq 0 ]
27
+
echo"$output"
28
+
[ $(expr "$output":'.*"allowed":true.*')-ne 0 ]
29
+
}
30
+
17
31
@test "Test allAreUsed" {
18
32
run kwctl run --request-path test_data/deployment_allareused.json --settings-path test_data/settings_allareused.json annotated-policy.wasm
19
33
[ "$status"-eq 0 ]
20
34
echo"$output"
21
35
[ $(expr "$output":'.*"allowed":false.*')-ne 0 ]
22
36
}
23
37
38
+
@test "Test allAreUsed with names only" {
39
+
run kwctl run --request-path test_data/deployment_allareused.json --settings-path test_data/settings_allareused_names_only.json annotated-policy.wasm
40
+
[ "$status"-eq 0 ]
41
+
echo"$output"
42
+
[ $(expr "$output":'.*"allowed":false.*')-ne 0 ]
43
+
}
44
+
24
45
@test "Test notAllAreUsed" {
25
46
run kwctl run --request-path test_data/deployment_notallareused.json --settings-path test_data/settings_notallareused.json annotated-policy.wasm
26
47
[ "$status"-eq 0 ]
27
48
echo"$output"
28
49
[ $(expr "$output":'.*"allowed":false.*')-ne 0 ]
29
50
}
51
+
52
+
@test "Test notAllAreUsed with names only" {
53
+
run kwctl run --request-path test_data/deployment_notallareused.json --settings-path test_data/settings_notallareused_names_only.json annotated-policy.wasm
0 commit comments