From 840a44bfce5355da3951b0917735f324899b1f86 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Thu, 26 Oct 2023 21:09:27 +0200 Subject: [PATCH] add testdata --- schema_test.go | 2 +- testdata/values.schema.json | 14 ++++++++++++++ testdata/values.yaml | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 testdata/values.schema.json create mode 100644 testdata/values.yaml diff --git a/schema_test.go b/schema_test.go index 276cff6..c05f7aa 100644 --- a/schema_test.go +++ b/schema_test.go @@ -112,7 +112,7 @@ func TestPrintMap(t *testing.T) { var yamlData map[string]interface{} - err := readAndUnmarshalYAML("values.yaml", &yamlData) + err := readAndUnmarshalYAML("testdata/values.yaml", &yamlData) if err != nil { t.Fatalf("Failed to mock YAML data: %v", err) } diff --git a/testdata/values.schema.json b/testdata/values.schema.json new file mode 100644 index 0000000..374b36c --- /dev/null +++ b/testdata/values.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "nodeSelector": { + "type": "object", + "properties": { + "kubernetes.io/hostname": { + "type": "string" + } + } + } + } +} diff --git a/testdata/values.yaml b/testdata/values.yaml new file mode 100644 index 0000000..4c4de0c --- /dev/null +++ b/testdata/values.yaml @@ -0,0 +1,2 @@ +nodeSelector: + kubernetes.io/hostname: "node1"