MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / TestGetClients

Function TestGetClients

internal/aws/clients_test.go:32–62  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestGetClients(t *testing.T) {
33 cfg := &config.CLIConfig{
34 AWS: config.AWSConfig{
35 Region: "us-west-2",
36 },
37 }
38
39 factory, err := NewClientFactory(cfg)
40 if err != nil {
41 t.Fatalf("Failed to create client factory: %v", err)
42 }
43
44 clients := factory.GetClients()
45
46 // Test that interfaces are properly created
47 if clients.CloudFormation == nil {
48 t.Error("Expected CloudFormation client to be created")
49 }
50 if clients.Lambda == nil {
51 t.Error("Expected Lambda client to be created")
52 }
53 if clients.S3 == nil {
54 t.Error("Expected S3 client to be created")
55 }
56 if clients.STS == nil {
57 t.Error("Expected STS client to be created")
58 }
59 if clients.CloudWatchLogs == nil {
60 t.Error("Expected CloudWatchLogs client to be created")
61 }
62}
63
64func TestGetRegion(t *testing.T) {
65 cfg := &config.CLIConfig{

Callers

nothing calls this directly

Calls 3

GetClientsMethod · 0.95
NewClientFactoryFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected