Skip to content

Add missing UT to Static Middleware #1720

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

Closed
pafuent opened this issue Dec 16, 2020 · 3 comments · Fixed by #1740
Closed

Add missing UT to Static Middleware #1720

pafuent opened this issue Dec 16, 2020 · 3 comments · Fixed by #1740

Comments

@pafuent
Copy link
Contributor

pafuent commented Dec 16, 2020

The #1718 modified how static files are handled to prevent directory traversal. On that PR, some unit test were added to echo_test.go, but those test were not implemented for the Static Middleware (static_test.go)
The idea of this issue is to implement the missing test on the Static Middleware in relation to TestEchoStatic tests.

@aldas
Copy link
Contributor

aldas commented Dec 17, 2020

@pafuent there were tests for middleware. See that patch file in comment #1718 (comment)

@pafuent
Copy link
Contributor Author

pafuent commented Dec 18, 2020

@aldas Nice!!!
The idea of this issue was to foster contributions though the use of "good first issue" label. But if the code is already there, I guess I'll wait some more days, and then I'll make use of your patch to avoid this blind spot on our testing.

lammel added a commit that referenced this issue Jan 1, 2021
…tests

refactor static middleware tests not to use previous case state (#1720)
@lammel
Copy link
Contributor

lammel commented Jan 1, 2021

Covered by PR 1740. We now have tests covering static directory traversal also for the static middlerware.
Thanks @aldas

@lammel lammel closed this as completed Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants