Skip to content

Commit

Permalink
Test image api through local V1 repo
Browse files Browse the repository at this point in the history
Closes moby#10967
Signed-off-by: Srini Brahmaroutu <[email protected]>
  • Loading branch information
brahmaroutu committed Mar 23, 2015
1 parent ded0ada commit 5daa926
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions integration-cli/docker_cli_pull_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func TestPullNonExistingImage(t *testing.T) {
// pulling an image from the central registry using official names should work
// ensure all pulls result in the same image
func TestPullImageOfficialNames(t *testing.T) {
testRequires(t, Network)

names := []string{
"docker.io/hello-world",
"index.docker.io/hello-world",
Expand Down
11 changes: 11 additions & 0 deletions integration-cli/requirements.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"log"
"net/http"
"os/exec"
"strings"
"testing"
Expand Down Expand Up @@ -32,6 +33,16 @@ var (
func() bool { return supportsExec },
"Test requires 'docker exec' capabilities on the tested daemon.",
}
Network = TestRequirement{
func() bool {
resp, err := http.Get("http://hub.docker.com")
if resp != nil {
resp.Body.Close()
}
return err == nil
},
"Test requires network availability, environment variable set to none to run in a non-network enabled mode.",
}
RegistryHosting = TestRequirement{
func() bool {
// for now registry binary is built only if we're running inside
Expand Down

0 comments on commit 5daa926

Please sign in to comment.