config: Add proper keys for tests

This commit is contained in:
Harshavardhana
2015-11-19 00:44:01 -08:00
parent 26fa3ce647
commit 628e8734ce
3 changed files with 8 additions and 27 deletions
+8 -1
View File
@@ -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)
-8
View File
@@ -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)
-18
View File
@@ -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
}