add test to check if buildkitd process is running

pull/12081/head
Steven Powell 2021-10-01 19:02:34 +00:00
parent ec1d89bda0
commit 4a83d436f1
1 changed files with 6 additions and 1 deletions

View File

@ -255,10 +255,15 @@ func validateImageCommands(ctx context.Context, t *testing.T, profile string) {
t.Run("ImageBuild", func(t *testing.T) {
MaybeParallel(t)
rr, err := Run(t exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "pgrep", "buildkitd"))
if err == nil {
t.Errorf("buildkitd process is running, should not be running until `minikube image build` is ran")
}
newImage := fmt.Sprintf("localhost/my-image:%s", profile)
// try to build the new image with minikube
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "image", "build", "-t", newImage, filepath.Join(*testdataDir, "build")))
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "image", "build", "-t", newImage, filepath.Join(*testdataDir, "build")))
if err != nil {
t.Fatalf("building image with minikube: %v\n%s", err, rr.Output())
}