diff options
Diffstat (limited to 'internal/github/github_test.go')
-rw-r--r-- | internal/github/github_test.go | 34 |
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") -} |