Gilbert Gilb's
db03aed816
feat(backends/s3): add warmup support for check command ( #5248 )
2026-06-25 20:46:55 +02:00
Michael Eischer
072305c5b3
repository: run version sub-tests of TestAllVersions in parallel
...
TestRepositoryIncrementalIndex no longer modified index.Full as this
modified global state and also had no effect on the test result.
2026-06-20 19:59:37 +02:00
Michael Eischer
b24d05bcb4
skip key decryption in tests
2026-06-20 19:46:22 +02:00
Michael Eischer
440d925467
repository: default to fastest compression in tests
2026-06-20 19:46:22 +02:00
Michael Eischer
71f38d266c
ensure reliable cleanup of test repository ( #21880 )
2026-06-14 14:25:00 +02:00
Michael Eischer
b892b1a150
repository: move lock file handling from restic package
2026-06-13 21:31:23 +02:00
Michael Eischer
8e11f5747d
restic: introduce Counter interface to decouple from ui/progress ( #21861 )
...
decouple restic and ui/progress packages
2026-06-13 21:08:18 +02:00
Michael Eischer
c8a0bc2c5e
repository: move crypto package to internal/repository/crypto
2026-06-13 20:05:06 +02:00
Michael Eischer
d62e42e620
repository: unexport NewChecker
2026-06-13 19:48:02 +02:00
Michael Eischer
b7bbb408ee
check: refactor pack selection for read data
...
Drop the `packs` map from the internal state of the checker. Instead the
Packs(...) method now calls a filter callback that can select the
packs intended for checking.
2025-10-03 23:45:05 +02:00
Michael Eischer
f0955fa931
repository: add Checker() method to repository to replace unchecked cast
2025-10-03 19:34:33 +02:00
Michael Eischer
189b295c30
repository: add dedicated test helper
2025-10-03 19:34:33 +02:00
Michael Eischer
4dc71f24c5
backends: pass error logger to backends
2025-10-03 18:22:42 +02:00
Martin Smith
3788605127
Rename unused parameters to '_'.
2025-03-22 18:20:30 +00:00
Michael Eischer
99e105eeb6
repository: restrict SaveUnpacked and RemoveUnpacked
...
Those methods now only allow modifying snapshots. Internal data types
used by the repository are now read-only. The repository-internal code
can bypass the restrictions by wrapping the repository in an
`internalRepository` type.
The restriction itself is implemented by using a new datatype
WriteableFileType in the SaveUnpacked and RemoveUnpacked methods. This
statically ensures that code cannot bypass the access restrictions.
The test changes are somewhat noisy as some of them modify repository
internals and therefore require some way to bypass the access
restrictions. This works by capturing an `internalRepository` or
`Backend` when creating the Repository using a test helper function.
2025-01-13 22:39:57 +01:00
Michael Eischer
8a425c2f0a
remove usages of repo.Backend() from tests
2024-05-18 21:42:51 +02:00
Michael Eischer
d8b184b3d3
repository: convert test helper to return *repository.Repository
2024-05-18 21:38:31 +02:00
Michael Eischer
7d1b9cde34
repository: use normal Init method in tests
2024-04-14 13:45:11 +02:00
Michael Eischer
5e98f1e2eb
repository: fix test setup race conditions
2024-03-28 23:17:02 +01:00
Michael Eischer
dc441c57a7
repository: unify repository initialization in tests
...
Tests should use a helper from internal/repository/testing.go to
construct a Repository object.
2024-03-28 23:17:02 +01:00
Michael Eischer
3ba1fa3cee
repository: remove a few global variables
2024-03-28 23:17:02 +01:00
Michael Eischer
16e3f79e8b
repository: make repo.Options configurable for test repos
2024-02-03 18:22:47 +01:00
Michael Eischer
1b8a67fe76
move Backend interface to backend package
2023-10-25 23:00:18 +02:00
Michael Eischer
d1a5ec7839
Rename unused testing parameter to _
...
The parameter is an additional marker that the test helper must only be
used for tests.
2023-05-18 21:17:53 +02:00
Michael Eischer
1adf28a2b5
repository: properly return invalid data error in LoadUnpacked
...
The retry backend does not return the original error, if its execution
is interrupted by canceling the context. Thus, we have to manually
ensure that the invalid data error gets returned.
Additionally, use the retry backend for some of the repository tests, as
this is the configuration which will be used by restic.
2023-01-14 17:57:02 +01:00
greatroar
c0b5ec55ab
repository: Remove empty cleanup functions in tests
...
TestRepository and its variants always returned no-op cleanup functions.
If they ever do need to do cleanup, using testing.T.Cleanup is easier
than passing these functions around.
2022-12-11 11:06:25 +01:00
Michael Eischer
2e3f1c08c5
repository: split index into a separate package
2022-10-08 21:15:34 +02:00
Michael Eischer
0a6fa602c8
add option for setting min pack size
2022-08-05 23:47:12 +02:00
Michael Eischer
1974ad7ce2
repository: hide MasterIndex.FinalizeFullIndexes / FinalizeNotFinalIndexes
2022-07-02 18:39:59 +02:00
Michael Eischer
bf81bf0795
repository: Properly set id for finalized index
...
As MergeFinalIndex and index uploads can occur concurrently, it is
necessary for MergeFinalIndex to check whether the IDs for an index were
already set before merging it. Otherwise, we'd loose the ID of an index
which is set _after_ uploading it.
2022-07-02 18:39:59 +02:00
Michael Eischer
9ffb8920f1
repository: run blackbox tests using old and new repo version
2022-04-30 11:34:10 +02:00
Alexander Neumann
8b11b86383
Add option global --compression
2022-04-30 11:34:10 +02:00
Michael Eischer
cd783358d3
local: Limit concurrent backend operations
...
Use a limit of 2 similar to the filereader concurrency in the archiver.
2022-04-09 12:21:38 +02:00
Alexander Neumann
7facc8ccc1
Merge pull request #2505 from aawsome/fix-repo-configfile
...
Fix repo configfile
2020-12-07 07:52:37 +01:00
Michael Eischer
45e9a55c62
Wire context into backend layout detection
2020-10-09 22:37:24 +02:00
Alexander Weiss
d3c59d18e5
Fix inconsistency of saving/loading config file
...
Fix saving/loading config file: Always set ID to a zero ID.
2020-06-13 16:30:23 +02:00
greatroar
4f6fd9fb98
Remove remnant of Go 1.9 compatibility code from tests
2020-02-26 22:23:38 +01:00
Chris Howie
1688713400
Add key hinting ( #2097 )
2018-11-25 09:13:18 -05:00
Alexander Neumann
0532f08048
Add test.Helper, also works with Go 1.8
2018-04-22 11:37:05 +02:00
Alexander Neumann
b9ada91054
Reduce data for TestCreateSnapshot
2018-03-11 21:42:39 +01:00
Alexander Neumann
178e946fc7
Rename KDFParams -> Params
2017-10-28 10:28:29 +02:00
Alexander Neumann
23c903074c
Move restic package to internal/restic
2017-07-24 17:43:32 +02:00
Alexander Neumann
6caeff2408
Run goimports
2017-07-23 14:21:03 +02:00
Alexander Neumann
83d1a46526
Moves files
2017-07-23 14:19:13 +02:00