aboutsummaryrefslogtreecommitdiff
path: root/internal/service/testdata
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2025-04-21 16:45:39 -0500
committerSlack Coder <slackcoder@server.ky>2025-04-22 15:27:36 -0500
commitd75e17a48934e4896963fb0fee78dbd53f4e780b (patch)
tree27a4fd16640846df846d36d2fc5b898189b68620 /internal/service/testdata
parente7dd47e8b683a51851883bf2918086963676d7cd (diff)
downloadmirror-d75e17a48934e4896963fb0fee78dbd53f4e780b.tar.xz
Implement staging and verificationv0.0.3
Ensure data integrity by supporting data staging and verification.
Diffstat (limited to 'internal/service/testdata')
-rw-r--r--internal/service/testdata/integration_test_config.toml29
1 files changed, 29 insertions, 0 deletions
diff --git a/internal/service/testdata/integration_test_config.toml b/internal/service/testdata/integration_test_config.toml
new file mode 100644
index 0000000..87a93e5
--- /dev/null
+++ b/internal/service/testdata/integration_test_config.toml
@@ -0,0 +1,29 @@
+[[mirrors]]
+method = "git"
+from = "https://git.server.ky/slackcoder/mirror"
+to = "/tmp/local-mirror/slackcoder/mirror"
+description = "Mirror project"
+staging-method = "temporary"
+verify = "git verify-commit HEAD"
+
+[[mirrors]]
+method = "rsync"
+from = "rsync://ftp.gnu.org/gnu/taler"
+to = "/tmp/local-mirror/gnu/taler"
+staging-method = "persistent"
+verify = "find . -print0 -mindepth 1 -not -name '*.sig' | xargs -0L1 -d '{}' gpg2 --verify-files '{}'.sig"
+
+[[mirrors]]
+method = "github-assets"
+from = "https://github.com/yt-dlp/yt-dlp"
+to = "/tmp/local-mirror/yt-dlp"
+staging-method = "persistent"
+verify = """
+mapfile -d '' releases < <( find . -maxdepth 1 -mindepth 1 -type d -print0 )
+for release in "${releases[@]}"; do
+ (cd "$release";
+ gpg2 --quiet --verify-files SHA2-256SUMS.sig &&
+ sha256sum --quiet --check SHA2-256SUMS
+ ) || exit 1
+done
+"""