|
496 | 496 | echo "$output" | grep -q "tenant names must" |
497 | 497 | # And assert kubectl did NOT report creation — if validation regressed |
498 | 498 | # into a "warn" variant, the server could still accept the object. A bare |
499 | | - # `! echo | grep` is vacuous under cozytest's `set -e` (suppressed for a `!` |
500 | | - # pipeline), so the regression would slip through; assert via `if ...; false`. |
| 499 | + # `! echo | grep` is vacuous under cozytest's `set -e` (suppressed for any |
| 500 | + # command whose status is inverted with `!`), so the regression would slip |
| 501 | + # through; assert via `if ...; false`. |
501 | 502 | if echo "$output" | grep -qi "created"; then echo "FAIL: kubectl reported the tenant as created — validation must reject it, not warn"; false; fi |
502 | 503 |
|
503 | 504 | # Post-condition cleanup: even though we expect validation to reject the |
|
614 | 615 | -o jsonpath='{.data.version}') |
615 | 616 | kubectl delete configmap cozystack-version -n cozy-system |
616 | 617 | # A bare `! kubectl get` is vacuous under cozytest's `set -e` (errexit is |
617 | | - # suppressed for a `!` pipeline), so a delete that silently failed would not |
618 | | - # fail the test; assert the absence via `if kubectl get; then ...; false`. |
| 618 | + # suppressed for any command whose status is inverted with `!`), so a |
| 619 | + # delete that silently failed would not fail the test; assert the absence |
| 620 | + # via `if kubectl get; then ...; false`. |
619 | 621 | if kubectl get configmap cozystack-version -n cozy-system 2>/dev/null; then echo "FAIL: cozystack-version configmap must be gone after delete with the no-delete label removed"; false; fi |
620 | 622 | # Reconstruct: declarative apply matches the chart template at |
621 | 623 | # packages/core/platform/templates/cozystack-version.yaml — same label set |
|
0 commit comments