aboutsummaryrefslogtreecommitdiffsponsor
path: root/internal/service/rsync_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/service/rsync_test.go')
-rw-r--r--internal/service/rsync_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/service/rsync_test.go b/internal/service/rsync_test.go
new file mode 100644
index 0000000..c6c2341
--- /dev/null
+++ b/internal/service/rsync_test.go
@@ -0,0 +1,21 @@
+package service
+
+import (
+ "path"
+ "testing"
+
+ "git.server.ky/slackcoder/mirror/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestRsync(t *testing.T) {
+ d := t.TempDir()
+
+ dst := internal.MustURL(d)
+ src := internal.MustURL("rsync://mirror.cedia.org.ec/gnu/taler")
+
+ err := Rsync(dst, src)
+ require.NoError(t, err, "rsync")
+
+ require.FileExists(t, path.Join(dst.Path, "taler-merchant-0.11.3.tar.gz"))
+}