From e859ebc12e8d084c6e4e08dc41b3fbc21f93e95b Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Thu, 25 May 2023 15:59:16 +0100 Subject: [PATCH] tests: add bake test for remote cmd context override Signed-off-by: Justin Chadwell --- tests/bake.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/bake.go b/tests/bake.go index 7e17aa53..facd07e9 100644 --- a/tests/bake.go +++ b/tests/bake.go @@ -21,6 +21,7 @@ func bakeCmd(sb integration.Sandbox, dir string, args ...string) (string, error) var bakeTests = []func(t *testing.T, sb integration.Sandbox){ testBakeRemote, testBakeRemoteCmdContext, + testBakeRemoteCmdContextOverride, } func testBakeRemote(t *testing.T, sb integration.Sandbox) { @@ -86,3 +87,43 @@ EOT require.FileExists(t, filepath.Join(dirDest, "foo")) } + +func testBakeRemoteCmdContextOverride(t *testing.T, sb integration.Sandbox) { + bakefile := []byte(` +target "default" { + context = BAKE_CMD_CONTEXT + dockerfile-inline = <