Skip case-sensitive test on Windows

Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
This commit is contained in:
Roberto Villarreal
2025-05-09 18:36:11 -06:00
parent 65aea3028f
commit 56d39e619d
+5 -1
View File
@@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"reflect" "reflect"
"regexp" "regexp"
"runtime"
"testing" "testing"
hcl "github.com/hashicorp/hcl/v2" hcl "github.com/hashicorp/hcl/v2"
@@ -2306,6 +2307,9 @@ func TestJSONOverridePriority(t *testing.T) {
}) })
t.Run("JSON override works with lowercase vars", func(t *testing.T) { t.Run("JSON override works with lowercase vars", func(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Windows case-insensitivity")
}
dt := []byte(` dt := []byte(`
variable "foo" { variable "foo" {
type = number type = number
@@ -2316,7 +2320,7 @@ func TestJSONOverridePriority(t *testing.T) {
bar = foo bar = foo
} }
}`) }`)
// may seem reasonable, but not supported // may seem reasonable, but not supported (on case-sensitive systems)
t.Setenv("foo_json", "9000") t.Setenv("foo_json", "9000")
c, err := ParseFile(dt, "docker-bake.hcl") c, err := ParseFile(dt, "docker-bake.hcl")
require.NoError(t, err) require.NoError(t, err)