diff --git a/cmd/s3backup/main_test.go b/cmd/s3backup/main_test.go index e88c569..8fd3e79 100644 --- a/cmd/s3backup/main_test.go +++ b/cmd/s3backup/main_test.go @@ -7,9 +7,18 @@ import ( ) func TestCheckPaths(t *testing.T) { + localPath = "s3://foo/bar.txt" + remotePath = "s3://foo/bar.txt" + assert.Error(t, checkPaths(), "cannot have two remote paths") + + localPath = "bar.txt" + remotePath = "bar.txt" + assert.Error(t, checkPaths(), "cannot have two local paths") + localPath = "bar.txt" remotePath = "s3://foo/bar.txt" assert.NilError(t, checkPaths()) + localPath = "s3://foo/bar.txt" remotePath = "bar.txt" assert.NilError(t, checkPaths())