Skip to content

Commit

Permalink
test: add importbin case
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Sep 15, 2022
1 parent 7a45f65 commit 56ef9fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jsonnetsecure/jsonnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@ func TestSecureVM(t *testing.T) {
snapshotx.SnapshotT(t, result)
})
}

t.Run("case=importbin", func(t *testing.T) {
// importbin does not exist in the current version, but is already merged on the main branch:
// https://github.com/google/go-jsonnet/commit/856bd58872418eee1cede0badea5b7b462c429eb
vm := MakeSecureVM()
result, err := vm.EvaluateAnonymousSnippet("test", "local contents = importbin 'stub/import.jsonnet'; { contents: contents }")
require.Error(t, err, "%s", result)
})
}

0 comments on commit 56ef9fb

Please sign in to comment.