(t *testing.T)
| 116 | } |
| 117 | |
| 118 | func TestGeneratePromptIncludesGitHubAWPrompt(t *testing.T) { |
| 119 | compiler := NewCompiler() |
| 120 | |
| 121 | data := &WorkflowData{ |
| 122 | MarkdownContent: "Test workflow content", |
| 123 | } |
| 124 | |
| 125 | var yaml strings.Builder |
| 126 | compiler.generatePrompt(&yaml, data, false, nil) |
| 127 | |
| 128 | output := yaml.String() |
| 129 | |
| 130 | // Check that GH_AW_PROMPT environment variable is always included |
| 131 | if !strings.Contains(output, "GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt") { |
| 132 | t.Error("Expected 'GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt' in prompt generation step") |
| 133 | } |
| 134 | |
| 135 | // Check that env section is always present now |
| 136 | if !strings.Contains(output, "env:") { |
| 137 | t.Error("Expected 'env:' section in prompt generation step") |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func TestMissingToolPromptGeneration(t *testing.T) { |
| 142 | compiler := NewCompiler() |
nothing calls this directly
no test coverage detected