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

Function TestDefaultCLIConfig

internal/config/config_test.go:26–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24}
25
26func TestDefaultCLIConfig(t *testing.T) {
27 cfg := DefaultCLIConfig()
28
29 // Test AWS defaults
30 if cfg.AWS.Region != "us-west-2" {
31 t.Errorf("Expected default region us-west-2, got %s", cfg.AWS.Region)
32 }
33
34 // Test deployment defaults
35 if !strings.HasPrefix(cfg.Deployment.StackName, "lambda-nat-proxy-") {
36 t.Errorf("Expected default stack name to start with lambda-nat-proxy-, got %s", cfg.Deployment.StackName)
37 }
38 if cfg.Deployment.Mode != ModeNormal {
39 t.Errorf("Expected default mode normal, got %s", cfg.Deployment.Mode)
40 }
41
42 // Test proxy defaults
43 if cfg.Proxy.Port != 1080 {
44 t.Errorf("Expected default port 1080, got %d", cfg.Proxy.Port)
45 }
46 if cfg.Proxy.STUNServer == "" {
47 t.Error("Expected STUN server to be set by default")
48 }
49}
50
51func TestLoadCLIConfig(t *testing.T) {
52 // Test loading with no config file (should use defaults)

Callers

nothing calls this directly

Calls 2

DefaultCLIConfigFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected