Commit graph

24 commits

Author SHA1 Message Date
Michael Eischer
9557efad55 Fix TestListWithUnexpectedFiles test
The test should test both API versions.
2023-06-17 21:57:58 +02:00
Michael Eischer
84a8b210f5 return empty array if there are no objects to list
Previously "null" was returned, which does not match the REST backend
specification.
2023-06-17 21:57:41 +02:00
Michael Eischer
22a6412b81 Ignore unexpected files in intermediate directories
Listing the data/ folder in a repository no longer fails if it contains
files in the data/ folder. This also ignore .DS_Store files created by
macOS.
2023-04-08 20:17:44 +02:00
Michael Eischer
f763db8934 Deduplicate handler initialization in tests 2022-09-02 23:41:05 +02:00
Michael Eischer
a8fdca3b9f make deleting idempotent 2022-09-02 23:32:52 +02:00
Michael Eischer
cb2afaa4c0 test that inaccessible files result in status 'internal error' 2022-08-31 22:29:14 +02:00
MichaelEischer
1172d7e068
Merge pull request #160 from Enrico204/reply-with-insufficient-storage-on-disk-full
Reply "insufficient storage" on disk full or over-quota
2021-09-07 21:28:07 +02:00
Enrico204
fb5d63435a Fix tests for: reply "insufficient storage" on disk full or over-quota 2021-09-06 22:32:07 +02:00
Oliver Buschjost
f61292b00d Use Minio's optimized SHA-256 2021-08-27 18:21:44 +02:00
Alexander Neumann
04d206303c Add test for race condition with aborted connection 2021-08-12 22:15:08 +02:00
Alexander Neumann
e6cc79a2ec Fix comment 2021-08-12 22:14:36 +02:00
Alexander Neumann
7fe16b69b2 Mark helper functions 2021-08-12 22:14:36 +02:00
Michael Eischer
54adcb1fc7 Verify uploaded files
Restic uses the sha256 hash to calculate filenames based on the file
content. Check on the rest-server side that the uploaded file is intact
and reject it otherwise.
2021-08-09 15:35:13 +02:00
Konrad Wojas
32c138aa84 Add tests for subrepos 2021-08-09 10:49:41 +02:00
Konrad Wojas
c2958906ea Fix TestSplitURLPath 2021-08-09 10:49:41 +02:00
Konrad Wojas
63c8797ba3 Fix tests, add PanicOnError option
- Helper method for internal server errors with consistent logging.
- Add PanicOnError option to panic on internal server errors. This
  makes it easier to traces where the condition was hit in testing.
2021-08-09 10:49:41 +02:00
Konrad Wojas
d4cd47e503 Minor cleanup and fixes
- Do not allow '.' as path component, because it undermines depth
  checks, and add tests
- Fix GiB reporting
- Fix metrics label
- Helper function for http errors
2021-08-09 10:49:41 +02:00
Konrad Wojas
1f593fafaf Make Server use the new repo.Handler
This contains all the glue to make Server use the new repo.Handler:

- Remove all old handlers
- Add ServeHTTP to make Server a single http.Handler
- Remove Goji routing and replace by net/http and custom routing logic

Additionally, this implements two-level backup repositories.
2021-08-09 10:49:41 +02:00
Alexander Neumann
4b8ef2cbd7 Fix tests 2020-09-13 12:08:46 +02:00
Matthew Holt
df3b6aa1cf Rename Config to Server and use singular one in main 2018-04-15 08:31:50 -06:00
Matthew Holt
b98c171644 Refactor handlers: make Config not global 2018-04-12 19:55:44 -06:00
Alexander Neumann
8dad5a5f41 Add test for append-only mode 2018-04-02 13:09:37 +02:00
Alexander Neumann
69ed06aa66 Move TestIsUserPath to correct package 2018-03-20 21:16:58 +01:00
Alexander Neumann
a628c4e01a Fix directory traversal
This commit introduces the strict checks from net/http.Dir, which fixes
a directory traversal issue.

Closes #22
2017-07-30 17:37:45 +02:00