(t *testing.T)
| 721 | } |
| 722 | |
| 723 | func 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 | |
| 734 | func TestCreationRuleNativeKeyLists(t *testing.T) { |
| 735 | var sampleConfigWithNativeKeyLists = []byte(` |
nothing calls this directly
no test coverage detected