@@ -227,14 +227,14 @@ describe("authClaudeLogin", () => {
227227 )
228228 ) . pipe ( Effect . provide ( NodeContext . layer ) ) )
229229
230- it . effect ( "uses a decoded docker-git OAuth env token without running setup-token" , ( ) =>
230+ it . effect ( "ignores docker-git OAuth env token and captures setup-token output " , ( ) =>
231231 withTempDir ( ( root ) =>
232232 withPatchedEnv (
233233 {
234234 HOME : root ,
235235 DOCKER_GIT_STATE_AUTO_SYNC : "0" ,
236236 DOCKER_GIT_PROJECTS_ROOT : undefined ,
237- [ dockerGitClaudeOauthTokenEnvKey ] : ` ${ oauthToken } `
237+ [ dockerGitClaudeOauthTokenEnvKey ] : "ENV_CLAUDE_OAUTH_TOKEN_SHOULD_NOT_WIN"
238238 } ,
239239 Effect . gen ( function * ( _ ) {
240240 const fs = yield * _ ( FileSystem . FileSystem )
@@ -248,13 +248,14 @@ describe("authClaudeLogin", () => {
248248 label : null ,
249249 claudeAuthPath
250250 } ) . pipe (
251- Effect . provideService ( CommandExecutor . CommandExecutor , makeFakeExecutor ( null , 0 , invocations ) )
251+ Effect . provideService ( CommandExecutor . CommandExecutor , makeFakeExecutor ( oauthToken , 0 , invocations ) )
252252 )
253253 )
254254
255255 const tokenText = yield * _ ( fs . readFileString ( path . join ( claudeAuthPath , "default" , ".oauth-token" ) ) )
256256 expect ( tokenText . trim ( ) ) . toBe ( oauthToken )
257- expect ( invocations . some ( ( invocation ) => isSetupToken ( invocation . args ) ) ) . toBe ( false )
257+ expect ( tokenText . trim ( ) ) . not . toBe ( "ENV_CLAUDE_OAUTH_TOKEN_SHOULD_NOT_WIN" )
258+ expect ( invocations . some ( ( invocation ) => isSetupToken ( invocation . args ) ) ) . toBe ( true )
258259 expect ( invocations . some ( ( invocation ) => isPingProbe ( invocation . args ) ) ) . toBe ( true )
259260 } )
260261 )
0 commit comments