@@ -73,6 +73,7 @@ test("AuthStore:login 合并落盘,logout 按域清理并报告变更", async ()
7373 const store = makeAuthStore ( { flags : { } , file : { } , env : { } } ) ;
7474 await store . login ( {
7575 api_key : "sk-1" ,
76+ base_url : "https://model.example.com/compatible-mode/v1" ,
7677 access_token : "tok-1" ,
7778 access_key_id : "ak-1" ,
7879 access_key_secret : "secret-1" ,
@@ -82,6 +83,7 @@ test("AuthStore:login 合并落盘,logout 按域清理并报告变更", async ()
8283 } ) ;
8384 expect ( makeConfigStore ( ) . read ( ) ) . toMatchObject ( {
8485 api_key : "sk-1" ,
86+ base_url : "https://model.example.com" ,
8587 access_token : "tok-1" ,
8688 workspace_id : "ws-1" ,
8789 console_site : "international" ,
@@ -90,15 +92,18 @@ test("AuthStore:login 合并落盘,logout 按域清理并报告变更", async ()
9092 expect ( await store . logout ( "console" ) ) . toBe ( true ) ;
9193 expect ( makeConfigStore ( ) . read ( ) . access_token ) . toBeUndefined ( ) ;
9294 expect ( makeConfigStore ( ) . read ( ) . api_key ) . toBe ( "sk-1" ) ;
95+ expect ( makeConfigStore ( ) . read ( ) . base_url ) . toBe ( "https://model.example.com" ) ;
9396
9497 expect ( await store . logout ( "openapi" ) ) . toBe ( true ) ;
9598 expect ( makeConfigStore ( ) . read ( ) ) . toMatchObject ( { api_key : "sk-1" } ) ;
99+ expect ( makeConfigStore ( ) . read ( ) . base_url ) . toBe ( "https://model.example.com" ) ;
96100 expect ( makeConfigStore ( ) . read ( ) . access_key_id ) . toBeUndefined ( ) ;
97101 expect ( makeConfigStore ( ) . read ( ) . access_key_secret ) . toBeUndefined ( ) ;
98102 expect ( makeConfigStore ( ) . read ( ) . security_token ) . toBeUndefined ( ) ;
99103
100104 expect ( await store . logout ( "all" ) ) . toBe ( true ) ;
101105 expect ( makeConfigStore ( ) . read ( ) . api_key ) . toBeUndefined ( ) ;
106+ expect ( makeConfigStore ( ) . read ( ) . base_url ) . toBeUndefined ( ) ;
102107 expect ( await store . logout ( "all" ) ) . toBe ( false ) ;
103108
104109 // 非凭证键不受 logout 影响
0 commit comments