mirror of https://github.com/docker/docs.git
integration-cli: log error when starting registry
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
0cdfd84aee
commit
55cec657bb
|
@ -18,7 +18,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
remoteRepoName = "dockercli/busybox-by-dgst"
|
remoteRepoName = "dockercli/busybox-by-dgst"
|
||||||
repoName = fmt.Sprintf("%v/%s", privateRegistryURL, remoteRepoName)
|
repoName = fmt.Sprintf("%s/%s", privateRegistryURL, remoteRepoName)
|
||||||
pushDigestRegex = regexp.MustCompile("[\\S]+: digest: ([\\S]+) size: [0-9]+")
|
pushDigestRegex = regexp.MustCompile("[\\S]+: digest: ([\\S]+) size: [0-9]+")
|
||||||
digestRegex = regexp.MustCompile("Digest: ([\\S]+)")
|
digestRegex = regexp.MustCompile("Digest: ([\\S]+)")
|
||||||
)
|
)
|
||||||
|
|
|
@ -1567,7 +1567,7 @@ func setupRegistry(c *check.C) *testRegistryV2 {
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Assert(err, check.IsNil, check.Commentf("Timeout waiting for test registry to become available"))
|
c.Assert(err, check.IsNil, check.Commentf("Timeout waiting for test registry to become available: %v", err))
|
||||||
return reg
|
return reg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ func (t *testRegistryV2) Ping() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode)
|
return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -37,7 +37,6 @@ func newTestRegistry(c *check.C) (*testRegistry, error) {
|
||||||
matched, err = regexp.MatchString(re, url)
|
matched, err = regexp.MatchString(re, url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Fatal("Error with handler regexp")
|
c.Fatal("Error with handler regexp")
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if matched {
|
if matched {
|
||||||
function(w, r)
|
function(w, r)
|
||||||
|
|
Loading…
Reference in New Issue