We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74dc30e commit 0b21903Copy full SHA for 0b21903
1 file changed
lib/config_test.go
@@ -26,14 +26,16 @@ func TestConfigFromArgs(t *testing.T) {
26
"-path=mypath",
27
"-quiet=true",
28
"-region=myregion",
29
- "-source=mysource",
30
"-endpoint-url=http://localhost:9000",
31
"-distribution-id=mydistro1",
32
"-distribution-id=mydistro2",
33
"-ignore=^ignored-prefix.*",
34
"-try=true",
35
}
36
+ tempDir := t.TempDir()
37
+ args = append(args, "-source="+tempDir)
38
+
39
cfg, err := ConfigFromArgs(args)
40
c.Assert(err, qt.IsNil)
41
c.Assert(cfg.Init(), qt.IsNil)
@@ -46,7 +48,7 @@ func TestConfigFromArgs(t *testing.T) {
46
48
c.Assert(cfg.ACL, qt.Equals, "public-read")
47
49
c.Assert(cfg.BucketPath, qt.Equals, "mypath")
50
c.Assert(cfg.Silent, qt.Equals, true)
- c.Assert(cfg.SourcePath, qt.Equals, "mysource")
51
+ c.Assert(cfg.SourcePath, qt.Contains, tempDir)
52
c.Assert(cfg.EndpointURL, qt.Equals, "http://localhost:9000")
53
c.Assert(cfg.Try, qt.Equals, true)
54
c.Assert(cfg.RegionName, qt.Equals, "myregion")
0 commit comments