(t *testing.T)
| 848 | } |
| 849 | |
| 850 | func TestDestinationValidationSingleS3Destination(t *testing.T) { |
| 851 | validS3Config := []byte(` |
| 852 | destination_rules: |
| 853 | - path_regex: '^test/.*' |
| 854 | s3_bucket: 'my-s3-bucket' |
| 855 | s3_prefix: 'sops/' |
| 856 | recreation_rule: |
| 857 | kms: 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012' |
| 858 | `) |
| 859 | conf, err := parseDestinationRuleForFile(parseConfigFile(validS3Config, t), "test/secrets.yaml", nil) |
| 860 | assert.Nil(t, err) |
| 861 | assert.NotNil(t, conf.Destination) |
| 862 | assert.Contains(t, conf.Destination.Path("secrets.yaml"), "s3://my-s3-bucket/sops/secrets.yaml") |
| 863 | } |
| 864 | |
| 865 | func TestDestinationValidationSingleGCSDestination(t *testing.T) { |
| 866 | validGCSConfig := []byte(` |
nothing calls this directly
no test coverage detected