diff --git a/bake/bake_test.go b/bake/bake_test.go index 75306cb2..0a116c47 100644 --- a/bake/bake_test.go +++ b/bake/bake_test.go @@ -303,7 +303,7 @@ services: require.True(t, ok) require.Equal(t, "Dockerfile.webapp", *m["webapp"].Dockerfile) - require.Equal(t, ".", *m["webapp"].Context) + require.Equal(t, "/src/bake", *m["webapp"].Context) require.Equal(t, ptrstr("1"), m["webapp"].Args["buildno"]) require.Equal(t, ptrstr("12"), m["webapp"].Args["buildno2"]) @@ -364,7 +364,7 @@ services: _, ok = m["web_app"] require.True(t, ok) require.Equal(t, "Dockerfile.webapp", *m["web_app"].Dockerfile) - require.Equal(t, ".", *m["web_app"].Context) + require.Equal(t, "/src/bake", *m["web_app"].Context) require.Equal(t, ptrstr("1"), m["web_app"].Args["buildno"]) require.Equal(t, ptrstr("12"), m["web_app"].Args["buildno2"]) @@ -555,7 +555,7 @@ services: require.Equal(t, "Dockerfile", *m["app1"].Dockerfile) require.Equal(t, ".", *m["app1"].Context) require.Equal(t, "Dockerfile", *m["app2"].Dockerfile) - require.Equal(t, ".", *m["app2"].Context) + require.Equal(t, "/src/bake", *m["app2"].Context) } func TestReadContextFromTargetChain(t *testing.T) { diff --git a/bake/compose_test.go b/bake/compose_test.go index 4c11a203..f20a9f21 100644 --- a/bake/compose_test.go +++ b/bake/compose_test.go @@ -62,11 +62,11 @@ secrets: return c.Targets[i].Name < c.Targets[j].Name }) require.Equal(t, "db", c.Targets[0].Name) - require.Equal(t, "./db", *c.Targets[0].Context) + require.Equal(t, "/src/bake/db", *c.Targets[0].Context) require.Equal(t, []string{"docker.io/tonistiigi/db"}, c.Targets[0].Tags) require.Equal(t, "webapp", c.Targets[1].Name) - require.Equal(t, "./dir", *c.Targets[1].Context) + require.Equal(t, "/src/bake/dir", *c.Targets[1].Context) require.Equal(t, map[string]string{"foo": "/bar"}, c.Targets[1].Contexts) require.Equal(t, "Dockerfile-alternate", *c.Targets[1].Dockerfile) require.Equal(t, 1, len(c.Targets[1].Args)) @@ -80,7 +80,7 @@ secrets: }, c.Targets[1].Secrets) require.Equal(t, "webapp2", c.Targets[2].Name) - require.Equal(t, "./dir", *c.Targets[2].Context) + require.Equal(t, "/src/bake/dir", *c.Targets[2].Context) require.Equal(t, "FROM alpine\n", *c.Targets[2].DockerfileInline) }