You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using .mockignore to prevent some mock JSON files from being loaded by Mockaco, .mockignore from parent folders are not considered.
According to .gitignore documentation,
[...] Git normally checks gitignore patterns from multiple sources, with the following order of precedence, from highest to lowest (within one level of precedence, the last matching pattern decides the outcome):[...]
Patterns read from a .gitignore file in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the toplevel of the work tree) being overridden by those in lower level files down to the directory containing the file.
To Reproduce
Create a .mockignore in the mock root path like:
**/*.json
Create a sub-folder named "Foo" and include any mock inside it:
{
"response": {
"body": "This mock should not be returned!"
}
}
Run mockaco
mockaco --urls="http://localhost:5000"
Access the url
$ curl http://localhost:5000
"This mock should not be returned!"
Expected behavior
The parent folder .mockignore should be respected, and the mock should not be returned.
If there is any .mockignore, it's setting should override parent rules just like .gitignore.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using .mockignore to prevent some mock JSON files from being loaded by Mockaco, .mockignore from parent folders are not considered.
According to .gitignore documentation,
To Reproduce
Expected behavior
The parent folder .mockignore should be respected, and the mock should not be returned.
If there is any .mockignore, it's setting should override parent rules just like .gitignore.
The text was updated successfully, but these errors were encountered: