7167: update keep-rsync tests to use "Contains" instead of "HasSuffix" to make sure...
[arvados.git] / tools / keep-rsync / keep-rsync_test.go
index 143e1552272ae1e5f09dd2224861e3309d83d743..e72889038850631bb8205ee1602326d307d729fc 100644 (file)
@@ -369,7 +369,7 @@ func (s *ServerRequiredSuite) TestErrorDuringRsync_ErrorPuttingBlockInDst(c *C)
        kcDst.Want_replicas = 2
 
        err := performKeepRsync(kcSrc, kcDst, blobSigningKey, "")
-       c.Check(strings.HasSuffix(err.Error(), "Could not write sufficient replicas"), Equals, true)
+       c.Check(strings.Contains(err.Error(), "Could not write sufficient replicas"), Equals, true)
 }
 
 // Test loadConfig func
@@ -413,7 +413,7 @@ func (s *ServerNotRequiredSuite) TestLoadConfig_MissingSrcConfig(c *C) {
 // Test loadConfig func - error reading config
 func (s *ServerNotRequiredSuite) TestLoadConfig_ErrorLoadingSrcConfig(c *C) {
        _, _, err := loadConfig("no-such-config-file")
-       c.Assert(strings.HasSuffix(err.Error(), "no such file or directory"), Equals, true)
+       c.Assert(strings.Contains(err.Error(), "no such file or directory"), Equals, true)
 }
 
 func setupConfigFile(c *C, name string) *os.File {