BugSETI/ghcheck_test.go
Claude 4566e7f62e
feat: extract BugSETI from core/cli into standalone repo
Move distributed bug fixing app from core/cli internal/bugseti/ and
cmd/bugseti/ into its own module. Library code at package root,
app entry point in cmd/, design docs in docs/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:55:58 +00:00

23 lines
511 B
Go

package bugseti
import (
"os"
"testing"
)
func TestCheckForge_Bad_MissingConfig(t *testing.T) {
// Clear any env-based forge config to ensure CheckForge fails
t.Setenv("FORGE_TOKEN", "")
t.Setenv("FORGE_URL", "")
// Point HOME to a temp dir so no config file is found
t.Setenv("HOME", t.TempDir())
if xdg := os.Getenv("XDG_CONFIG_HOME"); xdg != "" {
t.Setenv("XDG_CONFIG_HOME", t.TempDir())
}
_, err := CheckForge()
if err == nil {
t.Fatal("expected error when forge is not configured")
}
}