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

Function TestLoadConfigFileWithVaultDestinationRules

config/config_test.go:723–732  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

721}
722
723func TestLoadConfigFileWithVaultDestinationRules(t *testing.T) {
724 conf, err := parseDestinationRuleForFile(parseConfigFile(sampleConfigWithVaultDestinationRules, t), "vault-v2/barfoo", nil)
725 assert.Nil(t, err)
726 assert.NotNil(t, conf.Destination)
727 assert.Contains(t, conf.Destination.Path("barfoo"), "/v1/secret/data/foobar/barfoo")
728 conf, err = parseDestinationRuleForFile(parseConfigFile(sampleConfigWithVaultDestinationRules, t), "vault-v1/barfoo", nil)
729 assert.Nil(t, err)
730 assert.NotNil(t, conf.Destination)
731 assert.Contains(t, conf.Destination.Path("barfoo"), "/v1/kv/barfoo/barfoo")
732}
733
734func TestCreationRuleNativeKeyLists(t *testing.T) {
735 var sampleConfigWithNativeKeyLists = []byte(`

Callers

nothing calls this directly

Calls 3

parseConfigFileFunction · 0.85
PathMethod · 0.65

Tested by

no test coverage detected