aboutsummaryrefslogtreecommitdiff
path: root/internal/github/github_test.go
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-08-05 04:48:55 -0500
committerSlack Coder <slackcoder@server.ky>2024-08-05 04:48:55 -0500
commitd7b3c49d5cf467b90ce6f3399e77caa630f01a49 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /internal/github/github_test.go
parent8161ec7d53a4c921c61b3e6e936daac63ca06d9e (diff)
downloadmirror-d7b3c49d5cf467b90ce6f3399e77caa630f01a49.tar.xz
Set To Do branch
Diffstat (limited to 'internal/github/github_test.go')
-rw-r--r--internal/github/github_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/internal/github/github_test.go b/internal/github/github_test.go
deleted file mode 100644
index 5f3a270..0000000
--- a/internal/github/github_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package github
-
-import (
- "os"
- "path"
- "testing"
-
- "git.server.ky/slackcoder/mirror/internal"
- "github.com/stretchr/testify/require"
-)
-
-func TestMirrorDendrite(t *testing.T) {
- d := t.TempDir()
-
- dst := internal.MustURL(d)
- src := internal.MustURL("https://github.com/matrix-org/dendrite")
- oldFile := "random_file.txt"
-
- f, cErr := os.Create(path.Join(dst.Path, oldFile))
- require.NoError(t, cErr)
- f.Close()
-
- c := NewClient()
- err := c.MirrorAssets(dst, src)
- require.NoError(t, err, "dendrite assets")
-
- require.FileExists(t, path.Join(dst.Path, "v0.13.7", "dendrite-0.13.7.tar.gz"))
- require.FileExists(t, path.Join(dst.Path, "v0.13.7", "dendrite-0.13.7.zip"))
-
- err = c.MirrorAssets(dst, src)
- require.NoError(t, err, "dendrite assets")
-
- require.NoFileExists(t, path.Join(dst.Path, oldFile), "only files from mirror should exist")
-}