Initial commit on Forgejo
Fresh repository history for elektrine/tarakan-client hosted at https://git.elektrine.com/elektrine/tarakan-client.
This commit is contained in:
commit
58b29a7f84
70 changed files with 12994 additions and 0 deletions
24
internal/headless/headless_test.go
Normal file
24
internal/headless/headless_test.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package headless
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/atomine-elektrine/tarakan-client/internal/agent"
|
||||
repoctx "github.com/atomine-elektrine/tarakan-client/internal/context"
|
||||
)
|
||||
|
||||
func TestRunReportsUnavailableAgent(t *testing.T) {
|
||||
var output bytes.Buffer
|
||||
err := Run(context.Background(), &output, repoctx.Info{Name: "repo", Root: t.TempDir()}, agent.Provider{Name: "codex"}, "review")
|
||||
if err == nil {
|
||||
t.Fatal("expected unavailable agent error")
|
||||
}
|
||||
for _, eventType := range []string{"session.started", "session.error"} {
|
||||
if !strings.Contains(output.String(), eventType) {
|
||||
t.Fatalf("output does not contain %q: %s", eventType, output.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue