Merge branch 'master' into 7492-keepproxy-upstream-errors
authorradhika <radhika@curoverse.com>
Wed, 28 Oct 2015 16:18:33 +0000 (12:18 -0400)
committerradhika <radhika@curoverse.com>
Wed, 28 Oct 2015 16:18:33 +0000 (12:18 -0400)
1  2 
tools/keep-rsync/keep-rsync_test.go

index 60bc90acff68f56f9015a611f6e83639d7676569,1cef216af5901e0115e366464f402b1773c7914d..143e1552272ae1e5f09dd2224861e3309d83d743
@@@ -4,6 -4,7 +4,7 @@@ import 
        "crypto/md5"
        "fmt"
        "io/ioutil"
+       "log"
        "os"
        "strings"
        "testing"
@@@ -327,7 -328,8 +328,8 @@@ func (s *ServerRequiredSuite) TestError
        setupRsync(c, false, 1)
  
        err := performKeepRsync(kcSrc, kcDst, "", "")
-       c.Check(strings.HasSuffix(err.Error(), "no such host"), Equals, true)
+       log.Printf("Err = %v", err)
+       c.Check(strings.Contains(err.Error(), "no such host"), Equals, true)
  }
  
  // Setup rsync using dstKeepServicesJSON with fake keepservers.
@@@ -338,7 -340,8 +340,8 @@@ func (s *ServerRequiredSuite) TestError
        setupRsync(c, false, 1)
  
        err := performKeepRsync(kcSrc, kcDst, "", "")
-       c.Check(strings.HasSuffix(err.Error(), "no such host"), Equals, true)
+       log.Printf("Err = %v", err)
+       c.Check(strings.Contains(err.Error(), "no such host"), Equals, true)
  }
  
  // Test rsync with signature error during Get from src.
@@@ -352,7 -355,7 +355,7 @@@ func (s *ServerRequiredSuite) TestError
        blobSigningKey = "thisisfakeblobsigningkey"
  
        err := performKeepRsync(kcSrc, kcDst, blobSigningKey, "")
 -      c.Check(strings.HasSuffix(err.Error(), "Block not found"), Equals, true)
 +      c.Check(strings.Contains(err.Error(), "HTTP 403 \"Forbidden\""), Equals, true)
  }
  
  // Test rsync with error during Put to src.