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

Function TestDestinationValidationSingleS3Destination

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

Source from the content-addressed store, hash-verified

848}
849
850func TestDestinationValidationSingleS3Destination(t *testing.T) {
851 validS3Config := []byte(`
852destination_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
865func TestDestinationValidationSingleGCSDestination(t *testing.T) {
866 validGCSConfig := []byte(`

Callers

nothing calls this directly

Calls 3

parseConfigFileFunction · 0.85
PathMethod · 0.65

Tested by

no test coverage detected