MCPcopy
hub / github.com/getsops/sops / TestDecodeNumber

Function TestDecodeNumber

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

Source from the content-addressed store, hash-verified

172}
173
174func TestDecodeNumber(t *testing.T) {
175 in := `42`
176 _, err := Store{}.treeBranchFromJSON([]byte(in))
177 assert.NotNil(t, err)
178 assert.Equal(t, "SOPS only supports JSON files with a top-level object (starting with '{'), not other JSON types. Got 42 of type int instead", err.Error())
179}
180
181func TestDecodeArray(t *testing.T) {
182 in := ` [42] `

Callers

nothing calls this directly

Calls 2

treeBranchFromJSONMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected