(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func 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 | |
| 34 | func TestGetCloudFormationTemplateWithCustomFile(t *testing.T) { |
| 35 | cfg := &config.CLIConfig{ |
nothing calls this directly
no test coverage detected