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

Function TestLoadConfigFileWithDestinationRule

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

Source from the content-addressed store, hash-verified

713}
714
715func TestLoadConfigFileWithDestinationRule(t *testing.T) {
716 conf, err := parseDestinationRuleForFile(parseConfigFile(sampleConfigWithDestinationRule, t), "barfoo", nil)
717 assert.Nil(t, err)
718 assert.Equal(t, "newpgp", conf.KeyGroups[0][0].ToString())
719 assert.NotNil(t, conf.Destination)
720 assert.Equal(t, "s3://foobar/test/barfoo", conf.Destination.Path("barfoo"))
721}
722
723func TestLoadConfigFileWithVaultDestinationRules(t *testing.T) {
724 conf, err := parseDestinationRuleForFile(parseConfigFile(sampleConfigWithVaultDestinationRules, t), "vault-v2/barfoo", nil)

Callers

nothing calls this directly

Calls 4

parseConfigFileFunction · 0.85
ToStringMethod · 0.65
PathMethod · 0.65

Tested by

no test coverage detected