config: Add proper keys for tests
This commit is contained in:
+8
-1
@@ -52,7 +52,14 @@ func (s *TestSuite) TestConfigAliasContext(c *C) {
|
||||
func (s *TestSuite) TestConfigHostContext(c *C) {
|
||||
console.IsExited = false
|
||||
|
||||
err := app.Run([]string{os.Args[0], "config", "host", "add", "*test.io", "invalid", "invalid"})
|
||||
err := app.Run([]string{os.Args[0],
|
||||
"config",
|
||||
"host",
|
||||
"add",
|
||||
"*test.io",
|
||||
"AKIKJAA5BMMU2RHO6IBB",
|
||||
"V7f1CCwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr9",
|
||||
})
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(console.IsExited, Equals, true)
|
||||
|
||||
|
||||
@@ -160,14 +160,6 @@ func (s *TestSuite) TestNewConfigV6(c *C) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *TestSuite) TestHostConfig(c *C) {
|
||||
hostcfg, err := getHostConfig("https://s3.amazonaws.com")
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(hostcfg.AccessKeyID, Equals, globalAccessKeyID)
|
||||
c.Assert(hostcfg.SecretAccessKey, Equals, globalSecretAccessKey)
|
||||
c.Assert(hostcfg.API, Equals, "S3v4")
|
||||
}
|
||||
|
||||
func (s *TestSuite) TestValidPERMS(c *C) {
|
||||
perms := accessPerms("private")
|
||||
c.Assert(perms.isValidAccessPERM(), Equals, true)
|
||||
|
||||
@@ -50,21 +50,3 @@ func (s *TestSuite) TestShareFailure(c *C) {
|
||||
// Reset back.
|
||||
console.IsExited = false
|
||||
}
|
||||
|
||||
func (s *TestSuite) TestShareSuccess(c *C) {
|
||||
objectURL := server.URL + "/bucket/object1"
|
||||
|
||||
err := app.Run([]string{os.Args[0], "share", "download", objectURL})
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(console.IsExited, Equals, false)
|
||||
|
||||
// Reset back
|
||||
console.IsExited = false
|
||||
|
||||
err = app.Run([]string{os.Args[0], "share", "download", "--expire=1h", objectURL})
|
||||
c.Assert(err, IsNil)
|
||||
c.Assert(console.IsExited, Equals, false)
|
||||
|
||||
// Reset back
|
||||
console.IsExited = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user