Skip to content

Commit

Permalink
fix(tests): Don't expect a json in stdout from kwctl anymore
Browse files Browse the repository at this point in the history
Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
  • Loading branch information
viccuad committed Aug 27, 2024
1 parent bc124d6 commit bdfa657
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
echo "output = ${output}"

[ "$status" -ne 0 ]
[ $(expr "$output" : '.*"valid":false.*') -ne 0 ]
[ $(expr "$output" : '.*"message":"deniedStorageClasses cannot be empty".*') -ne 0 ]
[ $(expr "$output" : '.*Provided settings are not valid: "deniedStorageClasses cannot be empty".*') -ne 0 ]
}

@test "Empty denied storage classes list should fail" {
Expand All @@ -18,8 +17,7 @@
echo "output = ${output}"

[ "$status" -ne 0 ]
[ $(expr "$output" : '.*"valid":false.*') -ne 0 ]
[ $(expr "$output" : '.*"message":"deniedStorageClasses cannot be empty".*') -ne 0 ]
[ $(expr "$output" : '.*Provided settings are not valid: "deniedStorageClasses cannot be empty".*') -ne 0 ]
}

@test "Fallback cannot be in the denied storage classes list" {
Expand All @@ -29,8 +27,7 @@
echo "output = ${output}"

[ "$status" -ne 0 ]
[ $(expr "$output" : '.*"valid":false.*') -ne 0 ]
[ $(expr "$output" : '.*"message":"fallbackStorageClass cannot be in deniedStorageClasses".*') -ne 0 ]
[ $(expr "$output" : '.*Provided settings are not valid: "fallbackStorageClass cannot be in deniedStorageClasses".*') -ne 0 ]
}

@test "Accept PVC not using denied storage classes names" {
Expand Down

0 comments on commit bdfa657

Please sign in to comment.