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

Nested wildcards are not working #51

Closed
josejulio opened this issue Jun 20, 2018 · 2 comments
Closed

Nested wildcards are not working #51

josejulio opened this issue Jun 20, 2018 · 2 comments

Comments

@josejulio
Copy link

I'm trying to mock the following call:

GET api/namespaces/my-namespace/services/my-service/metrics

I tried the following file:
api/namespaces/__/services/__/metrics/GET.mock and is not working, the server answers: "Not Mocked"

However this works: api/namespaces/__/services/my-service/metrics/GET.mock

It makes me believe that nesting the wilcards is not working (or not yet implemented).

@christianrondeau
Copy link

It's indeed not supported. I just hit the same issue, and the code in getWildcardPath actually "tries" all combinations of paths that contain a single __... so anything with more than one variable won't work.

I'll try and submit a PR.

@odino
Copy link
Contributor

odino commented Nov 18, 2018

This should be fixed in v2.2.0 thanks to @christianrondeau :)

@odino odino closed this as completed Nov 18, 2018
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

3 participants