docker_cli_build_test.go 680 B

12345678910111213141516171819202122232425262728
  1. package main
  2. import (
  3. "fmt"
  4. "os/exec"
  5. "path/filepath"
  6. "testing"
  7. )
  8. func TestBuildSixtySteps(t *testing.T) {
  9. buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestBuildSixtySteps")
  10. buildCmd := exec.Command(dockerBinary, "build", "-t", "foobuildsixtysteps", ".")
  11. buildCmd.Dir = buildDirectory
  12. out, exitCode, err := runCommandWithOutput(buildCmd)
  13. errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
  14. if err != nil || exitCode != 0 {
  15. t.Fatal("failed to build the image")
  16. }
  17. go deleteImages("foobuildsixtysteps")
  18. logDone("build - build an image with sixty build steps")
  19. }
  20. // TODO: TestCaching
  21. // TODO: TestADDCacheInvalidation