From fdcbab706212b8e2aafa55470934a3cabe05447e Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Sep 2024 17:31:05 +0200 Subject: [PATCH] Test that git is installed (#276) Every image should include git. Add a test that ensures this is the case. Fixes https://github.com/pulumi/pulumi-docker-containers/issues/271 --------- Co-authored-by: Thomas Gummerer --- tests/containers_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/containers_test.go b/tests/containers_test.go index 07df9fc4..b61372ca 100644 --- a/tests/containers_test.go +++ b/tests/containers_test.go @@ -406,6 +406,15 @@ func TestEnvironment(t *testing.T) { require.NoError(t, err) }) + // All images must include git. Deployments uses this to checkout the source code. + t.Run("Git", func(t *testing.T) { + t.Parallel() + + cmd := exec.Command("git", "--version") + err := cmd.Run() + require.NoError(t, err) + }) + t.Run("Workdir", func(t *testing.T) { t.Parallel() // Kitchen sink does not set `WORKDIR`.