aboutsummaryrefslogtreecommitdiffstats
path: root/services/archiver/archiver_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/archiver/archiver_test.go')
-rw-r--r--services/archiver/archiver_test.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/services/archiver/archiver_test.go b/services/archiver/archiver_test.go
index 67484fdc78..5417dfb939 100644
--- a/services/archiver/archiver_test.go
+++ b/services/archiver/archiver_test.go
@@ -5,6 +5,7 @@
package archiver
import (
+ "errors"
"path/filepath"
"testing"
"time"
@@ -19,10 +20,6 @@ func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", ".."))
}
-func waitForCount(t *testing.T, num int) {
-
-}
-
func TestArchive_Basic(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
@@ -83,11 +80,8 @@ func TestArchive_Basic(t *testing.T) {
inFlight[2] = secondReq
ArchiveRepository(zipReq)
- waitForCount(t, 1)
ArchiveRepository(tgzReq)
- waitForCount(t, 2)
ArchiveRepository(secondReq)
- waitForCount(t, 3)
// Make sure sending an unprocessed request through doesn't affect the queue
// count.
@@ -132,3 +126,8 @@ func TestArchive_Basic(t *testing.T) {
assert.NotEqual(t, zipReq.GetArchiveName(), tgzReq.GetArchiveName())
assert.NotEqual(t, zipReq.GetArchiveName(), secondReq.GetArchiveName())
}
+
+func TestErrUnknownArchiveFormat(t *testing.T) {
+ var err = ErrUnknownArchiveFormat{RequestFormat: "master"}
+ assert.True(t, errors.Is(err, ErrUnknownArchiveFormat{}))
+}