-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] - contains fails when expected and actual content is the same #174
Comments
Had a similar issue, but in my case I do have other elements in the array.
|
PS: I could use |
@cristiadu Following up on your suggestion: The template: volumes:
- name: config-volume
configMap:
name: app-02
- name: all-vault
projected:
sources:
- secret:
name: common-vault The test (expecting 'false' logic to not render a volume): - it: should not render the rookout volume when rookout.enabled is not given
templates:
- charts/app-01/templates/deployment.yaml
- charts/app-02/templates/deployment.yaml
asserts:
- isNull:
path: spec.template.spec.volumes[2] test result: - should not render the rookout volume when rookout.enabled is not given
- asserts[0] `isNull` fail
Template: charts-integration-test/charts/app-01/templates/deployment.yaml
DocumentIndex: 0
Error:
[2] :
- configMap:
name: foobar-ns-app-01
name: config-volume
- name: all-vault
projected:
sources:
- secret:
name: common-vault
Template: charts-integration-test/charts/app-02/templates/deployment.yaml
DocumentIndex: 0
Error:
[2] :
- configMap:
name: foobar-ns-app-02
name: config-volume
- name: all-vault
projected:
sources:
- secret:
name: common-vault
PASS test integration Ingress tests/ingress_test.yaml
PASS test integration service tests/service_test.yaml
Charts: 1 failed, 0 passed, 1 total
Test Suites: 1 failed, 3 passed, 4 total
Tests: 1 failed, 97 passed, 98 total
Snapshot: 0 passed, 0 total
Time: 3.860298409s
@quintush it seems that the processing of yaml arrays has a fundumental flaw in logic. I wish I speaked go so I could inteligently look into it. I think it has to do with go's OOB error when trying to evaluate an the 3rd item in a 2 item array. I think that in this context, OOB error should be treated as Null since when checking what the 3rd item in a 2 item array is equal to... well it equals to nothing we can comprehend or Null. Thanks for the effort. |
fix: schema definition types (resolves quintush#170)
The template:
The test:
The failure:
Obviously this should pass.
The text was updated successfully, but these errors were encountered: