Skip to content

Commit 0b21903

Browse files
committed
Fix broken test
1 parent 74dc30e commit 0b21903

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/config_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ func TestConfigFromArgs(t *testing.T) {
2626
"-path=mypath",
2727
"-quiet=true",
2828
"-region=myregion",
29-
"-source=mysource",
3029
"-endpoint-url=http://localhost:9000",
3130
"-distribution-id=mydistro1",
3231
"-distribution-id=mydistro2",
3332
"-ignore=^ignored-prefix.*",
3433
"-try=true",
3534
}
3635

36+
tempDir := t.TempDir()
37+
args = append(args, "-source="+tempDir)
38+
3739
cfg, err := ConfigFromArgs(args)
3840
c.Assert(err, qt.IsNil)
3941
c.Assert(cfg.Init(), qt.IsNil)
@@ -46,7 +48,7 @@ func TestConfigFromArgs(t *testing.T) {
4648
c.Assert(cfg.ACL, qt.Equals, "public-read")
4749
c.Assert(cfg.BucketPath, qt.Equals, "mypath")
4850
c.Assert(cfg.Silent, qt.Equals, true)
49-
c.Assert(cfg.SourcePath, qt.Equals, "mysource")
51+
c.Assert(cfg.SourcePath, qt.Contains, tempDir)
5052
c.Assert(cfg.EndpointURL, qt.Equals, "http://localhost:9000")
5153
c.Assert(cfg.Try, qt.Equals, true)
5254
c.Assert(cfg.RegionName, qt.Equals, "myregion")

0 commit comments

Comments
 (0)