From 655e654e99a00a248639a910923e0ce66c16581c Mon Sep 17 00:00:00 2001 From: radhika Date: Mon, 25 Apr 2016 15:38:24 -0400 Subject: [PATCH] 8936: add test to verify blobSignatureTTL from discovery when it is not provided. --- tools/keep-rsync/keep-rsync_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/keep-rsync/keep-rsync_test.go b/tools/keep-rsync/keep-rsync_test.go index bdae39a134..09609eb749 100644 --- a/tools/keep-rsync/keep-rsync_test.go +++ b/tools/keep-rsync/keep-rsync_test.go @@ -417,6 +417,18 @@ func (s *ServerNotRequiredSuite) TestLoadConfig_ErrorLoadingSrcConfig(c *C) { c.Assert(strings.Contains(err.Error(), "no such file or directory"), Equals, true) } +func (s *ServerNotRequiredSuite) TestSetupKeepClient_NoBlobSignatureTTL(c *C) { + var srcConfig apiConfig + srcConfig.APIHost = os.Getenv("ARVADOS_API_HOST") + srcConfig.APIToken = arvadostest.DataManagerToken + srcConfig.APIHostInsecure = matchTrue.MatchString(os.Getenv("ARVADOS_API_HOST_INSECURE")) + arvadostest.StartKeep(2, false) + + _, ttl, err := setupKeepClient(srcConfig, srcKeepServicesJSON, false, 0, 0) + c.Check(err, IsNil) + c.Assert(ttl, Equals, blobSignatureTTL) +} + func setupConfigFile(c *C, name string) *os.File { // Setup a config file file, err := ioutil.TempFile(os.TempDir(), name) -- 2.30.2