-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
bugSomething isn't workingSomething isn't working
Description
chainsaw version Version
v0.2.12
Description
When I use the following in my test:
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: v4-wrong-management-context
spec:
steps:
- name: apply config
try:
- apply:
file: config.yamlEverything looks normal in the test output:
| 11:31:27 | v4-wrong-management-context | @chainsaw | CREATE | OK | v1/Namespace @ chainsaw-frank-bullfrog
| 11:31:27 | v4-wrong-management-context | apply config | TRY | BEGIN |
| 11:31:27 | v4-wrong-management-context | apply config | APPLY | RUN | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:31:27 | v4-wrong-management-context | apply config | CREATE | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:31:27 | v4-wrong-management-context | apply config | APPLY | DONE | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:31:27 | v4-wrong-management-context | apply config | TRY | END |
| 11:31:27 | v4-wrong-management-context | apply config | CLEANUP | BEGIN |
| 11:31:27 | v4-wrong-management-context | apply config | DELETE | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:31:27 | v4-wrong-management-context | apply config | CLEANUP | END |
| 11:31:27 | v4-wrong-management-context | @chainsaw | CLEANUP | BEGIN |
| 11:31:27 | v4-wrong-management-context | @chainsaw | DELETE | OK | v1/Namespace @ chainsaw-frank-bullfrog
| 11:31:32 | v4-wrong-management-context | @chainsaw | CLEANUP | END |
But when I add an expect in the apply section of the test:
spec:
steps:
- name: apply config
try:
- apply:
file: config.yaml
expect:
- check:
($error != null): trueThen it's going crazy with an endless stream of PATCH actions:
| 11:32:06 | v4-wrong-management-context | @chainsaw | CREATE | OK | v1/Namespace @ chainsaw-still-hornet
| 11:32:06 | v4-wrong-management-context | apply config | TRY | BEGIN |
| 11:32:06 | v4-wrong-management-context | apply config | APPLY | RUN | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | CREATE | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
| 11:32:06 | v4-wrong-management-context | apply config | PATCH | OK | gravitee.io/v1alpha1/ManagementContext @ default/bad-credentials-ctx
[...]
Something seems off here.
Steps to reproduce
- Apply a YAML file
- Add
expectwith acheck
Expected behavior
Well, a working check
Screenshots
No response
Logs
Slack discussion
No response
Troubleshooting
- I have searched other issues in this repository and mine is not recorded.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working