Skip to content
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

Snapshot with Jsonpath using array filtering with more than 1 element #289

Open
lucasoares opened this issue Jan 26, 2024 · 0 comments
Open

Comments

@lucasoares
Copy link

I'm trying to create an assert to match the snapshot of an filtered array.

My path selector is a valid json path filtering all elements of an array with specific regex evaluation, but the result snapshot contains only the first match:

image

Test assert:

      - matchSnapshot:
          path: spec.template.spec.containers[0].env[?(@['name']=~/OTEL_.+/)]

Snapshot result:

image

Is there any workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant