all: make tests accept OUTER_SKETCH_ANTHROPIC_API_KEY
Inner sketch already has an ANTHROPIC_API_KEY...but it is the
sketch anthropic key, not the anthropic anthropic key. Blarg!
diff --git a/loop/agent_test.go b/loop/agent_test.go
index 24c1c55..0924b39 100644
--- a/loop/agent_test.go
+++ b/loop/agent_test.go
@@ -1,6 +1,7 @@
package loop
import (
+ "cmp"
"context"
"fmt"
"net/http"
@@ -63,9 +64,10 @@
t.Fatal(err)
}
+ apiKey := cmp.Or(os.Getenv("OUTER_SKETCH_ANTHROPIC_API_KEY"), os.Getenv("ANTHROPIC_API_KEY"))
cfg := AgentConfig{
Context: ctx,
- APIKey: os.Getenv("ANTHROPIC_API_KEY"),
+ APIKey: apiKey,
HTTPC: client,
Budget: budget,
GitUsername: "Test Agent",