aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serve_request.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-02-06Make symlinks into global fixturesSven-Hendrik Haase1-22/+9
So far, tests had to create their own symlinks which made them less concise. Also, now that we always have symlinks in all tests, side effects of having them won't go undetected.
2025-01-10Reorganize imports to be more consistentSven-Hendrik Haase1-8/+10
2024-06-09Bump reqwest to v0.12Sven-Hendrik Haase1-1/+1
2024-06-09Remove explicit dependency on httpSven-Hendrik Haase1-1/+1
We now use the one supplied by actix-web.
2024-01-30tweak test assertionsCarson McManus1-1/+5
2024-01-30add unit testsCarson McManus1-0/+31
2023-08-06Add pretty urlsNorberto Lopes1-0/+18
This adds a new flag namely `--pretty-urls` that when enabled will serve the equivalent `.html` if it exists. Very much the same approach that [`netlify` uses](https://docs.netlify.com/site-deploys/post-processing/). It can be quite useful when having hrefs like `/about` serve `/about.html`.
2022-12-30Run cargo fmtSven-Hendrik Haase1-4/+2
2022-12-19Fix lintsSven-Hendrik Haase1-15/+15
2022-09-15Check for directories in default request testSven-Hendrik Haase1-0/+3
2022-09-14Fix typosKian-Meng Ang1-2/+2
Found via `codespell -L crate`.
2022-07-28Apply suggestions from code reviewzhoupeiheng1-2/+23
2022-07-20Fix testcyqsimon1-1/+1
2022-05-18Fix security issue with --no-symlinksSven-Hendrik Haase1-21/+27
Even with --no-symlinks specified, if a direct path to a symlink had been entered, it would be resolved. This fixes that behavior and improves tests to ensure this behavior.
2022-02-06Fix route_prefix for css and faviconAli MJ Al-Nasrawy1-4/+4
2021-12-29Implement --route-prefix to set specific route prefixjikstra1-0/+15
2021-10-26Add test for --spaSven-Hendrik Haase1-5/+22
2021-08-30Implement show symlink destinationDean Li1-4/+15
Add option `show_symlink_info` to represent show symlink info or not. (Default to no) Show symlink destination after symlink symbol in directory listing Resemble `ls -l` and also the short argument select for this feature is also `-l`. Basic testing is included. Related to #499
2021-08-29Fix stderr output in test index_fallback_to_listingSven-Hendrik Haase1-3/+4
2021-08-29list directory if index not foundAli MJ Al-Nasrawy1-0/+11
2021-08-26new partial-injection syntaxAli MJ Al-Nasrawy1-2/+2
2021-08-26address commentsAli MJ Al-Nasrawy1-4/+8
2021-08-26tests: Refactor!Ali MJ Al-Nasrawy1-87/+23
Remove duplicate code responsible for the initial setup and teardown of the test binary. This introduces `TestServer` as a resource manager for a running miniserve binary, which can be created with the fixtures `server()` and `server_no_stderr()` It also provides convenience function for handling server url.
2021-04-11Test for --no-symlink optionAli MJ Al-Nasrawy1-8/+18
2021-04-06Test URL encoding for special charactersAli MJ Al-Nasrawy1-0/+6
2021-03-31Test for symlink directories and filesAli MJ Al-Nasrawy1-0/+64
Replace some of the testing files and directories with symbolic links. They should behave exactly the same.
2021-03-28Fix testsSven-Hendrik Haase1-2/+3
2021-03-20Add negative test for hidden directoriesSven-Hendrik Haase1-0/+31
2021-03-20Finish up --hidden featureSven-Hendrik Haase1-7/+2
2021-03-07Add option to show hidden filesSven-Hendrik Haase1-1/+52
2020-08-25Bump Dockerfile nightly versionSven-Hendrik Haase1-1/+0
2020-08-24Fix formattingSven-Hendrik Haase1-0/+1
2020-08-24Try to fix file names on WindowsSven-Hendrik Haase1-1/+0
2020-08-24Fix double-escaping (fixes #354)Sven-Hendrik Haase1-1/+8
2020-07-20cargo fmtSven-Hendrik Haase1-1/+1
2020-06-29Cast port to u16Isaac Parker1-3/+2
2020-06-28Bind to random port when port 0 specifiedIsaac Parker1-0/+26
2020-03-11Format everythingSven-Hendrik Haase1-3/+5
2020-03-11Bump reqwests to v0.10Sven-Hendrik Haase1-3/+3
2020-02-03specify port to avoid test conflictEli Flanagan1-1/+3
2019-09-25add a test for missing index fileEli Flanagan1-1/+26
2019-07-14Remove unnecessary importSven-Hendrik Haase1-1/+0
2019-07-07Also check directories in testsSven-Hendrik Haase1-3/+16
2019-05-01Make tests into their own proper modules without star importsSven-Hendrik Haase1-1/+10
Star imports make it hard to see which imports a module is actually using so I prefer to have this be a bit more explicit.
2019-04-29Move helpers.rs to fixtures/mod.rskhai96_1-2/+2
2019-04-28Split integration test into multiple fileskhai96_1-0/+44