Skip to content

Commit 4df9fed

Browse files
committed
fully test checkPaths
1 parent 492e53e commit 4df9fed

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/s3backup/main_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ import (
77
)
88

99
func TestCheckPaths(t *testing.T) {
10+
localPath = "s3://foo/bar.txt"
11+
remotePath = "s3://foo/bar.txt"
12+
assert.Error(t, checkPaths(), "cannot have two remote paths")
13+
14+
localPath = "bar.txt"
15+
remotePath = "bar.txt"
16+
assert.Error(t, checkPaths(), "cannot have two local paths")
17+
1018
localPath = "bar.txt"
1119
remotePath = "s3://foo/bar.txt"
1220
assert.NilError(t, checkPaths())
21+
1322
localPath = "s3://foo/bar.txt"
1423
remotePath = "bar.txt"
1524
assert.NilError(t, checkPaths())

0 commit comments

Comments
 (0)