From 628e8734ce31a81742c1268c7f1b8a659f956bca Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 19 Nov 2015 00:36:09 -0800 Subject: [PATCH] config: Add proper keys for tests --- config_test.go | 9 ++++++++- mc_test.go | 8 -------- share_test.go | 18 ------------------ 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/config_test.go b/config_test.go index 5e2afde0..d40b6a4e 100644 --- a/config_test.go +++ b/config_test.go @@ -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) diff --git a/mc_test.go b/mc_test.go index 460612a9..8f74223d 100644 --- a/mc_test.go +++ b/mc_test.go @@ -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) diff --git a/share_test.go b/share_test.go index af39710a..9e397190 100644 --- a/share_test.go +++ b/share_test.go @@ -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 -}