@@ -39,7 +39,8 @@ func TestUserAgentHeader(t *testing.T) {
3939 }),
4040 )
4141 client .Sessions .Start (context .Background (), stagehand.SessionStartParams {
42- Env : stagehand .SessionStartParamsEnvLocal ,
42+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
43+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
4344 })
4445 if userAgent != fmt .Sprintf ("Stagehand/Go %s" , internal .PackageVersion ) {
4546 t .Errorf ("Expected User-Agent to be correct, but got: %#v" , userAgent )
@@ -65,7 +66,8 @@ func TestRetryAfter(t *testing.T) {
6566 }),
6667 )
6768 _ , err := client .Sessions .Start (context .Background (), stagehand.SessionStartParams {
68- Env : stagehand .SessionStartParamsEnvLocal ,
69+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
70+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
6971 })
7072 if err == nil {
7173 t .Error ("Expected there to be a cancel error" )
@@ -102,7 +104,8 @@ func TestDeleteRetryCountHeader(t *testing.T) {
102104 option .WithHeaderDel ("X-Stainless-Retry-Count" ),
103105 )
104106 _ , err := client .Sessions .Start (context .Background (), stagehand.SessionStartParams {
105- Env : stagehand .SessionStartParamsEnvLocal ,
107+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
108+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
106109 })
107110 if err == nil {
108111 t .Error ("Expected there to be a cancel error" )
@@ -134,7 +137,8 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
134137 option .WithHeader ("X-Stainless-Retry-Count" , "42" ),
135138 )
136139 _ , err := client .Sessions .Start (context .Background (), stagehand.SessionStartParams {
137- Env : stagehand .SessionStartParamsEnvLocal ,
140+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
141+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
138142 })
139143 if err == nil {
140144 t .Error ("Expected there to be a cancel error" )
@@ -165,7 +169,8 @@ func TestRetryAfterMs(t *testing.T) {
165169 }),
166170 )
167171 _ , err := client .Sessions .Start (context .Background (), stagehand.SessionStartParams {
168- Env : stagehand .SessionStartParamsEnvLocal ,
172+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
173+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
169174 })
170175 if err == nil {
171176 t .Error ("Expected there to be a cancel error" )
@@ -190,7 +195,8 @@ func TestContextCancel(t *testing.T) {
190195 cancelCtx , cancel := context .WithCancel (context .Background ())
191196 cancel ()
192197 _ , err := client .Sessions .Start (cancelCtx , stagehand.SessionStartParams {
193- Env : stagehand .SessionStartParamsEnvLocal ,
198+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
199+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
194200 })
195201 if err == nil {
196202 t .Error ("Expected there to be a cancel error" )
@@ -212,7 +218,8 @@ func TestContextCancelDelay(t *testing.T) {
212218 cancelCtx , cancel := context .WithTimeout (context .Background (), 2 * time .Millisecond )
213219 defer cancel ()
214220 _ , err := client .Sessions .Start (cancelCtx , stagehand.SessionStartParams {
215- Env : stagehand .SessionStartParamsEnvLocal ,
221+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
222+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
216223 })
217224 if err == nil {
218225 t .Error ("expected there to be a cancel error" )
@@ -240,7 +247,8 @@ func TestContextDeadline(t *testing.T) {
240247 }),
241248 )
242249 _ , err := client .Sessions .Start (deadlineCtx , stagehand.SessionStartParams {
243- Env : stagehand .SessionStartParamsEnvLocal ,
250+ BrowserbaseAPIKey : "BROWSERBASE_API_KEY" ,
251+ BrowserbaseProjectID : "BROWSERBASE_PROJECT_ID" ,
244252 })
245253 if err == nil {
246254 t .Error ("expected there to be a deadline error" )
0 commit comments