Skip to content

Commit 4a83d43

Browse files
committed
add test to check if buildkitd process is running
1 parent ec1d89b commit 4a83d43

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: test/integration/functional_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,15 @@ func validateImageCommands(ctx context.Context, t *testing.T, profile string) {
255255
t.Run("ImageBuild", func(t *testing.T) {
256256
MaybeParallel(t)
257257

258+
rr, err := Run(t exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "pgrep", "buildkitd"))
259+
if err == nil {
260+
t.Errorf("buildkitd process is running, should not be running until `minikube image build` is ran")
261+
}
262+
258263
newImage := fmt.Sprintf("localhost/my-image:%s", profile)
259264

260265
// try to build the new image with minikube
261-
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "image", "build", "-t", newImage, filepath.Join(*testdataDir, "build")))
266+
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "image", "build", "-t", newImage, filepath.Join(*testdataDir, "build")))
262267
if err != nil {
263268
t.Fatalf("building image with minikube: %v\n%s", err, rr.Output())
264269
}

0 commit comments

Comments
 (0)