Commit Graph

22 Commits

Author SHA1 Message Date
Michael Eischer a816b827cf extract GlobalOptions into internal/global package
Rough steps:
```
mv cmd/restic/global* cmd/restic/secondary_repo* internal/global/
sed -i "s/package main/package global/" internal/global/*.go
Rename "GlobalOptions" to "Options" in internal/global/
Replace everywhere " GlobalOptions" -> " global.Options"
Replace everywhere "\*GlobalOptions" -> " *global.Options"
Make SecondaryRepoOptions public
Make create public
Make version public
```
2025-10-12 17:56:28 +02:00
Michael Eischer 2c677d8db4 global: make private fields public 2025-10-12 17:56:28 +02:00
Michael Eischer 56ac8360c7 data: split node and snapshot code from restic package 2025-10-03 19:10:39 +02:00
Michael Eischer c293736841 drop unused stderr from GlobalOptions 2025-10-03 18:55:46 +02:00
Michael Eischer 013c565c29 standardize shorten variable name for GlobalOptions to gopts 2025-10-03 18:55:46 +02:00
Michael Eischer 3410808dcf deduplicate termstatus setup 2025-10-03 18:55:46 +02:00
Michael Eischer 3e1632c412 reduce os.stdout / os.stderr usage in tests 2025-10-03 18:22:42 +02:00
Michael Eischer 6bd85d2412 reduce usages of globalOptions variable 2025-10-03 18:22:42 +02:00
Michael Eischer 60d80a6127 Fix linter warnings 2025-09-21 22:24:15 +02:00
Michael Eischer 6b5c8ce14e change run* functions to accept ui.Terminal instead of *termstatus.Terminal 2025-09-15 22:37:25 +02:00
Michael Eischer cb9247530e backup: run test with absolute path 2024-10-31 22:06:50 +01:00
Michael Eischer 6024597028 drop support for s3legacy layout 2024-08-31 17:25:24 +02:00
Srigovind Nayak fe412e2553 fix: restore inclusion logic and restore tests
doc: update exclude and include docs
2024-06-10 01:55:39 +05:30
Srigovind Nayak 188684ee9e fix: include and exclude logic, add tests for include file and exclude file 2024-06-09 19:07:23 +05:30
Srigovind Nayak 24a247a0dc test: update test case name 2024-06-08 13:23:35 +05:30
Srigovind Nayak fdf2e4ed0e restore: refactor include and exclude
- added includePatternOptions similar to excludePatternOptions
- followed similar approach to backup for selecting files for restore
2024-06-08 13:23:35 +05:30
Michael Eischer 55d56db31b Merge pull request #4743 from MichaelEischer/deprecate-s3legacy-layout
Deprecate s3legacy layout
2024-04-11 22:09:34 +02:00
Michael Eischer 591b421c4a Deprecate s3legacy layout 2024-04-10 21:27:56 +02:00
Michael Eischer ec2b79834a use consistent alias for interal/test package 2024-03-29 00:24:03 +01:00
Michael Eischer bb20078641 restore: pass termStatus to restore in tests 2023-06-09 12:03:33 +02:00
Michael Eischer cebce52c16 test: add helper to capture stdout for integration tests 2023-05-26 19:38:44 +02:00
Michael Eischer 675a49a95b Restructure integration tests
The tests are now split into individual files for each command. The
separation isn't perfect as many tests make use of multiple commands. In
particular `init`, `backup`, `check` and `list` are used by a larger
number of test cases.

Most tests now reside in files name cmd_<name>_integration_test.go. This
provides a certain indication which commands have significant test
coverage.
2023-05-26 19:38:43 +02:00