Skip to content

Commit

Permalink
add testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
losisin committed Oct 26, 2023
1 parent 7cdaf60 commit 840a44b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
14 changes: 14 additions & 0 deletions testdata/values.schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
2 changes: 2 additions & 0 deletions testdata/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeSelector:
kubernetes.io/hostname: "node1"

0 comments on commit 840a44b

Please sign in to comment.