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

Function TestGetCloudFormationTemplate

internal/deploy/templates_test.go:12–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestGetCloudFormationTemplate(t *testing.T) {
13 cfg := &config.CLIConfig{
14 Deployment: config.DeploymentConfig{
15 StackName: "test-stack",
16 },
17 }
18
19 template, err := GetCloudFormationTemplate(cfg, "")
20 if err != nil {
21 t.Fatalf("Expected no error getting template, got %v", err)
22 }
23
24 if template == "" {
25 t.Error("Expected template content, got empty string")
26 }
27
28 // Check that template contains expected CloudFormation content
29 if !strings.Contains(template, "AWSTemplateFormatVersion") {
30 t.Error("Expected template to contain AWSTemplateFormatVersion")
31 }
32}
33
34func TestGetCloudFormationTemplateWithCustomFile(t *testing.T) {
35 cfg := &config.CLIConfig{

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.80

Tested by

no test coverage detected