Skip to content

Commit

Permalink
Test metadata functions validate
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed Feb 2, 2023
1 parent eae342f commit 72cf0d2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions metadata_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package tfjson

import (
"encoding/json"
"os"
"testing"
)

func TestMetadataFunctionsValidate(t *testing.T) {
f, err := os.Open("testdata/basic/functions.json")
if err != nil {
t.Fatal(err)
}
defer f.Close()

var functions *MetadataFunctions
if err := json.NewDecoder(f).Decode(&functions); err != nil {
t.Fatal(err)
}

if err := functions.Validate(); err != nil {
t.Fatal(err)
}
}
Loading

0 comments on commit 72cf0d2

Please sign in to comment.