MCPcopy Index your code
hub / github.com/getsops/sops / TestDecodeSimpleJSONObject

Function TestDecodeSimpleJSONObject

stores/json/store_test.go:114–129  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

112}
113
114func TestDecodeSimpleJSONObject(t *testing.T) {
115 in := `{"foo": "bar", "baz": 2}`
116 expected := sops.TreeBranch{
117 sops.TreeItem{
118 Key: "foo",
119 Value: "bar",
120 },
121 sops.TreeItem{
122 Key: "baz",
123 Value: 2,
124 },
125 }
126 branch, err := Store{}.treeBranchFromJSON([]byte(in))
127 assert.Nil(t, err)
128 assert.Equal(t, expected, branch)
129}
130
131func TestLargeIntegerRoundtrip(t *testing.T) {
132 // Large integers (e.g. snowflake IDs, account numbers) must not be

Callers

nothing calls this directly

Calls 1

treeBranchFromJSONMethod · 0.80

Tested by

no test coverage detected