mirror of https://github.com/docker/docs.git
Merge pull request #6165 from vieux/update_tests
Update tests regarding busybox & inspect
This commit is contained in:
commit
aa61cc759b
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
// pulling an image from the central registry should work
|
// pulling an image from the central registry should work
|
||||||
func TestPullImageFromCentralRegistry(t *testing.T) {
|
func TestPullImageFromCentralRegistry(t *testing.T) {
|
||||||
pullCmd := exec.Command(dockerBinary, "pull", "busybox")
|
pullCmd := exec.Command(dockerBinary, "pull", "busybox:latest")
|
||||||
out, exitCode, err := runCommandWithOutput(pullCmd)
|
out, exitCode, err := runCommandWithOutput(pullCmd)
|
||||||
errorOut(err, t, fmt.Sprintf("%s %s", out, err))
|
errorOut(err, t, fmt.Sprintf("%s %s", out, err))
|
||||||
|
|
||||||
|
|
|
@ -133,10 +133,10 @@ func init() {
|
||||||
|
|
||||||
func setupBaseImage() {
|
func setupBaseImage() {
|
||||||
eng := newTestEngine(log.New(os.Stderr, "", 0), false, unitTestStoreBase)
|
eng := newTestEngine(log.New(os.Stderr, "", 0), false, unitTestStoreBase)
|
||||||
job := eng.Job("inspect", unitTestImageName, "image")
|
job := eng.Job("image_inspect", unitTestImageName)
|
||||||
img, _ := job.Stdout.AddEnv()
|
img, _ := job.Stdout.AddEnv()
|
||||||
// If the unit test is not found, try to download it.
|
// If the unit test is not found, try to download it.
|
||||||
if err := job.Run(); err != nil || img.Get("id") != unitTestImageID {
|
if err := job.Run(); err != nil || img.Get("Id") != unitTestImageID {
|
||||||
// Retrieve the Image
|
// Retrieve the Image
|
||||||
job = eng.Job("pull", unitTestImageName)
|
job = eng.Job("pull", unitTestImageName)
|
||||||
job.Stdout.Add(utils.NopWriteCloser(os.Stdout))
|
job.Stdout.Add(utils.NopWriteCloser(os.Stdout))
|
||||||
|
|
Loading…
Reference in New Issue