Browse code

Merge pull request #19219 from runcom/add-log

integration-cli: log error when starting registry

David Calavera authored on 2016/01/16 02:44:47
Showing 4 changed files
... ...
@@ -19,7 +19,7 @@ import (
19 19
 
20 20
 var (
21 21
 	remoteRepoName  = "dockercli/busybox-by-dgst"
22
-	repoName        = fmt.Sprintf("%v/%s", privateRegistryURL, remoteRepoName)
22
+	repoName        = fmt.Sprintf("%s/%s", privateRegistryURL, remoteRepoName)
23 23
 	pushDigestRegex = regexp.MustCompile("[\\S]+: digest: ([\\S]+) size: [0-9]+")
24 24
 	digestRegex     = regexp.MustCompile("Digest: ([\\S]+)")
25 25
 )
... ...
@@ -1567,7 +1567,7 @@ func setupRegistry(c *check.C, schema1 bool) *testRegistryV2 {
1567 1567
 		time.Sleep(100 * time.Millisecond)
1568 1568
 	}
1569 1569
 
1570
-	c.Assert(err, check.IsNil, check.Commentf("Timeout waiting for test registry to become available"))
1570
+	c.Assert(err, check.IsNil, check.Commentf("Timeout waiting for test registry to become available: %v", err))
1571 1571
 	return reg
1572 1572
 }
1573 1573
 
... ...
@@ -68,7 +68,7 @@ func (t *testRegistryV2) Ping() error {
68 68
 	if err != nil {
69 69
 		return err
70 70
 	}
71
-	if resp.StatusCode != 200 {
71
+	if resp.StatusCode != http.StatusOK {
72 72
 		return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode)
73 73
 	}
74 74
 	return nil
... ...
@@ -37,7 +37,6 @@ func newTestRegistry(c *check.C) (*testRegistry, error) {
37 37
 			matched, err = regexp.MatchString(re, url)
38 38
 			if err != nil {
39 39
 				c.Fatal("Error with handler regexp")
40
-				return
41 40
 			}
42 41
 			if matched {
43 42
 				function(w, r)