MCPcopy Create free account
hub / github.com/github/gh-aw / TestGeneratePromptIncludesGitHubAWPrompt

Function TestGeneratePromptIncludesGitHubAWPrompt

pkg/workflow/missing_tool_test.go:118–139  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

116}
117
118func 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
141func TestMissingToolPromptGeneration(t *testing.T) {
142 compiler := NewCompiler()

Callers

nothing calls this directly

Calls 4

generatePromptMethod · 0.95
NewCompilerFunction · 0.85
StringMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected