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

Function TestEncodeSimpleJSON

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

Source from the content-addressed store, hash-verified

284}
285
286func TestEncodeSimpleJSON(t *testing.T) {
287 branch := sops.TreeBranch{
288 sops.TreeItem{
289 Key: "foo",
290 Value: "bar",
291 },
292 sops.TreeItem{
293 Key: "foo",
294 Value: 3,
295 },
296 sops.TreeItem{
297 Key: "bar",
298 Value: false,
299 },
300 }
301 out, err := Store{}.jsonFromTreeBranch(branch)
302 assert.Nil(t, err)
303 expected, _ := Store{}.treeBranchFromJSON(out)
304 assert.Equal(t, expected, branch)
305}
306
307func TestEncodeJSONWithEscaping(t *testing.T) {
308 branch := sops.TreeBranch{

Callers

nothing calls this directly

Calls 2

jsonFromTreeBranchMethod · 0.80
treeBranchFromJSONMethod · 0.80

Tested by

no test coverage detected