fix lint
This commit is contained in:
parent
950b373e2b
commit
a7756e2a1c
1 changed files with 33 additions and 3 deletions
|
|
@ -202,9 +202,19 @@ func TestParseSteeringMode(t *testing.T) {
|
||||||
// --- AgentLoop steering integration tests ---
|
// --- AgentLoop steering integration tests ---
|
||||||
|
|
||||||
func TestAgentLoop_Steer_Enqueues(t *testing.T) {
|
func TestAgentLoop_Steer_Enqueues(t *testing.T) {
|
||||||
al, _, _, _, cleanup := newTestAgentLoop(t)
|
al, cfg, msgBus, provider, cleanup := newTestAgentLoop(t)
|
||||||
defer cleanup()
|
defer cleanup()
|
||||||
|
|
||||||
|
if cfg == nil {
|
||||||
|
t.Fatal("expected config to be initialized")
|
||||||
|
}
|
||||||
|
if msgBus == nil {
|
||||||
|
t.Fatal("expected message bus to be initialized")
|
||||||
|
}
|
||||||
|
if provider == nil {
|
||||||
|
t.Fatal("expected provider to be initialized")
|
||||||
|
}
|
||||||
|
|
||||||
al.Steer(providers.Message{Role: "user", Content: "interrupt me"})
|
al.Steer(providers.Message{Role: "user", Content: "interrupt me"})
|
||||||
|
|
||||||
if al.steering.len() != 1 {
|
if al.steering.len() != 1 {
|
||||||
|
|
@ -218,9 +228,19 @@ func TestAgentLoop_Steer_Enqueues(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAgentLoop_SteeringMode_GetSet(t *testing.T) {
|
func TestAgentLoop_SteeringMode_GetSet(t *testing.T) {
|
||||||
al, _, _, _, cleanup := newTestAgentLoop(t)
|
al, cfg, msgBus, provider, cleanup := newTestAgentLoop(t)
|
||||||
defer cleanup()
|
defer cleanup()
|
||||||
|
|
||||||
|
if cfg == nil {
|
||||||
|
t.Fatal("expected config to be initialized")
|
||||||
|
}
|
||||||
|
if msgBus == nil {
|
||||||
|
t.Fatal("expected message bus to be initialized")
|
||||||
|
}
|
||||||
|
if provider == nil {
|
||||||
|
t.Fatal("expected provider to be initialized")
|
||||||
|
}
|
||||||
|
|
||||||
if al.SteeringMode() != SteeringOneAtATime {
|
if al.SteeringMode() != SteeringOneAtATime {
|
||||||
t.Fatalf("expected default mode one-at-a-time, got %v", al.SteeringMode())
|
t.Fatalf("expected default mode one-at-a-time, got %v", al.SteeringMode())
|
||||||
}
|
}
|
||||||
|
|
@ -260,9 +280,19 @@ func TestAgentLoop_SteeringMode_ConfiguredFromConfig(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAgentLoop_Continue_NoMessages(t *testing.T) {
|
func TestAgentLoop_Continue_NoMessages(t *testing.T) {
|
||||||
al, _, _, _, cleanup := newTestAgentLoop(t)
|
al, cfg, msgBus, provider, cleanup := newTestAgentLoop(t)
|
||||||
defer cleanup()
|
defer cleanup()
|
||||||
|
|
||||||
|
if cfg == nil {
|
||||||
|
t.Fatal("expected config to be initialized")
|
||||||
|
}
|
||||||
|
if msgBus == nil {
|
||||||
|
t.Fatal("expected message bus to be initialized")
|
||||||
|
}
|
||||||
|
if provider == nil {
|
||||||
|
t.Fatal("expected provider to be initialized")
|
||||||
|
}
|
||||||
|
|
||||||
resp, err := al.Continue(context.Background(), "test-session", "test", "chat1")
|
resp, err := al.Continue(context.Background(), "test-session", "test", "chat1")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("unexpected error: %v", err)
|
t.Fatalf("unexpected error: %v", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue