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

Function createTestKMSClient

kms/keysource_test.go:637–645  ·  view source on GitHub ↗

createTestKMSClient creates a new client with the aws.EndpointResolverWithOptions set to epResolver.

(key MasterKey)

Source from the content-addressed store, hash-verified

635// createTestKMSClient creates a new client with the
636// aws.EndpointResolverWithOptions set to epResolver.
637func createTestKMSClient(key MasterKey) (*kms.Client, error) {
638 cfg, err := key.createKMSConfig(context.Background())
639 if err != nil {
640 return nil, err
641 }
642 return kms.NewFromConfig(*cfg, func(options *kms.Options) {
643 options.BaseEndpoint = aws.String(testKMSServerURL)
644 }), nil
645}

Callers 3

TestMainFunction · 0.85
TestMasterKey_EncryptFunction · 0.85
TestMasterKey_DecryptFunction · 0.85

Calls 2

createKMSConfigMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected