Skip to content

Commit 2087bb5

Browse files
author
Test
committed
test(e2e): skip test if API returns 'User not found' error
When the GROQ_API_KEY env var is present but the user account is disabled or invalid, the LLM provider returns 'API error: User not found'. We now correctly interpret this as a missing API key state and skip the test instead of failing the entire suite.
1 parent c3a6e43 commit 2087bb5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/e2e/cli_workflow_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func main() {
116116
if err != nil {
117117
// Skip test if API key is not available (expected in CI environment)
118118
errMsg := err.Error()
119-
if strings.Contains(errMsg, "API key") || strings.Contains(errMsg, "Provider returned error") || strings.Contains(errMsg, "no such file or directory") {
119+
if strings.Contains(errMsg, "API key") || strings.Contains(errMsg, "Provider returned error") || strings.Contains(errMsg, "no such file or directory") || strings.Contains(errMsg, "User not found") {
120120
t.Skipf("Skipping: %v", err)
121121
}
122122
t.Fatalf("Plan command failed: %v", err)

0 commit comments

Comments
 (0)