|
|
@ -1051,6 +1051,14 @@ func TestHCLMatrixBadTypes(t *testing.T) {
|
|
|
|
_, err := ParseFile(dt, "docker-bake.hcl")
|
|
|
|
_, err := ParseFile(dt, "docker-bake.hcl")
|
|
|
|
require.Error(t, err)
|
|
|
|
require.Error(t, err)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dt = []byte(`
|
|
|
|
|
|
|
|
target "default" {
|
|
|
|
|
|
|
|
matrix = ["test"]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`)
|
|
|
|
|
|
|
|
_, err = ParseFile(dt, "docker-bake.hcl")
|
|
|
|
|
|
|
|
require.Error(t, err)
|
|
|
|
|
|
|
|
|
|
|
|
dt = []byte(`
|
|
|
|
dt = []byte(`
|
|
|
|
target "default" {
|
|
|
|
target "default" {
|
|
|
|
matrix = {
|
|
|
|
matrix = {
|
|
|
@ -1061,6 +1069,16 @@ func TestHCLMatrixBadTypes(t *testing.T) {
|
|
|
|
_, err = ParseFile(dt, "docker-bake.hcl")
|
|
|
|
_, err = ParseFile(dt, "docker-bake.hcl")
|
|
|
|
require.Error(t, err)
|
|
|
|
require.Error(t, err)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dt = []byte(`
|
|
|
|
|
|
|
|
target "default" {
|
|
|
|
|
|
|
|
matrix = {
|
|
|
|
|
|
|
|
1 = 2
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`)
|
|
|
|
|
|
|
|
_, err = ParseFile(dt, "docker-bake.hcl")
|
|
|
|
|
|
|
|
require.Error(t, err)
|
|
|
|
|
|
|
|
|
|
|
|
dt = []byte(`
|
|
|
|
dt = []byte(`
|
|
|
|
target "default" {
|
|
|
|
target "default" {
|
|
|
|
matrix = {
|
|
|
|
matrix = {
|
|
|
|