Skip to content

Commit e689d18

Browse files
committed
bake: test empty attribute
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 71c7889 commit e689d18

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

bake/bake_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,24 @@ target "app" {
20192019
})
20202020
}
20212021

2022+
// https://github.com/docker/buildx/pull/428
2023+
// https://github.com/docker/buildx/issues/2822
2024+
func TestEmptyAttribute(t *testing.T) {
2025+
fp := File{
2026+
Name: "docker-bake.hcl",
2027+
Data: []byte(`
2028+
target "app" {
2029+
output = [""]
2030+
}
2031+
`),
2032+
}
2033+
2034+
ctx := context.TODO()
2035+
2036+
_, _, err := ReadTargets(ctx, []File{fp}, []string{"app"}, nil, nil)
2037+
require.NoError(t, err)
2038+
}
2039+
20222040
func stringify[V fmt.Stringer](values []V) []string {
20232041
s := make([]string, len(values))
20242042
for i, v := range values {

0 commit comments

Comments
 (0)