(t *testing.T)
| 863 | } |
| 864 | |
| 865 | func TestDestinationValidationSingleGCSDestination(t *testing.T) { |
| 866 | validGCSConfig := []byte(` |
| 867 | destination_rules: |
| 868 | - path_regex: '^test/.*' |
| 869 | gcs_bucket: 'my-gcs-bucket' |
| 870 | gcs_prefix: 'sops/' |
| 871 | recreation_rule: |
| 872 | kms: 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012' |
| 873 | `) |
| 874 | conf, err := parseDestinationRuleForFile(parseConfigFile(validGCSConfig, t), "test/secrets.yaml", nil) |
| 875 | assert.Nil(t, err) |
| 876 | assert.NotNil(t, conf.Destination) |
| 877 | assert.Contains(t, conf.Destination.Path("secrets.yaml"), "gcs://my-gcs-bucket/sops/secrets.yaml") |
| 878 | } |
| 879 | |
| 880 | func TestDestinationValidationSingleVaultDestination(t *testing.T) { |
| 881 | validVaultConfig := []byte(` |
nothing calls this directly
no test coverage detected