Sfoglia il codice sorgente

Merge pull request #6165 from vieux/update_tests

Update tests regarding busybox & inspect
unclejack 11 anni fa
parent
commit
aa61cc759b
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 1 1
      integration-cli/docker_cli_pull_test.go
  2. 2 2
      integration/runtime_test.go

+ 1 - 1
integration-cli/docker_cli_pull_test.go

@@ -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))
 
 

+ 2 - 2
integration/runtime_test.go

@@ -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))