@@ -60,20 +60,17 @@ impl<F: Infrastructure> AttachmentService for ForgeChatRequest<F> {
60
60
61
61
#[ cfg( test) ]
62
62
mod tests {
63
- use core:: str;
64
63
use std:: collections:: HashMap ;
65
64
use std:: path:: { Path , PathBuf } ;
66
65
use std:: sync:: { Arc , Mutex } ;
67
66
68
67
use base64:: Engine ;
69
68
use bytes:: Bytes ;
70
69
use forge_domain:: { AttachmentService , ContentType , Environment , Point , Query , Suggestion } ;
71
- use forge_oauth:: AuthFlowState ;
72
70
73
71
use crate :: attachment:: ForgeChatRequest ;
74
72
use crate :: {
75
- CredentialRepository , EmbeddingService , EnvironmentService , FileReadService ,
76
- Infrastructure , VectorIndex ,
73
+ EmbeddingService , EnvironmentService , FileReadService , Infrastructure , VectorIndex ,
77
74
} ;
78
75
79
76
struct MockEnvironmentService { }
@@ -93,7 +90,6 @@ mod tests {
93
90
provider_key : "key" . to_string ( ) ,
94
91
provider_url : "url" . to_string ( ) ,
95
92
openai_key : None ,
96
- force_antinomy : None ,
97
93
}
98
94
}
99
95
}
@@ -166,7 +162,6 @@ mod tests {
166
162
file_service : MockFileReadService ,
167
163
vector_index : MockVectorIndex ,
168
164
embedding_service : MockEmbeddingService ,
169
- auth_service : MockAuthService ,
170
165
}
171
166
172
167
impl MockInfrastructure {
@@ -176,37 +171,16 @@ mod tests {
176
171
file_service : MockFileReadService :: new ( ) ,
177
172
vector_index : MockVectorIndex { } ,
178
173
embedding_service : MockEmbeddingService { } ,
179
- auth_service : MockAuthService { } ,
180
174
}
181
175
}
182
176
}
183
177
184
- struct MockAuthService { }
185
-
186
- #[ async_trait:: async_trait]
187
- impl CredentialRepository for MockAuthService {
188
- fn create ( & self ) -> AuthFlowState {
189
- unimplemented ! ( )
190
- }
191
- async fn authenticate ( & self , _: AuthFlowState ) -> Result < ( ) , anyhow:: Error > {
192
- Ok ( ( ) )
193
- }
194
-
195
- fn delete ( & self ) -> Result < bool , anyhow:: Error > {
196
- Ok ( false )
197
- }
198
-
199
- fn credentials ( & self ) -> Option < String > {
200
- None
201
- }
202
- }
203
-
204
178
impl Infrastructure for MockInfrastructure {
205
179
type EnvironmentService = MockEnvironmentService ;
206
180
type FileReadService = MockFileReadService ;
207
181
type VectorIndex = MockVectorIndex ;
208
182
type EmbeddingService = MockEmbeddingService ;
209
- type CredentialRepository = MockAuthService ;
183
+
210
184
fn environment_service ( & self ) -> & Self :: EnvironmentService {
211
185
& self . env_service
212
186
}
@@ -222,10 +196,6 @@ mod tests {
222
196
fn embedding_service ( & self ) -> & Self :: EmbeddingService {
223
197
& self . embedding_service
224
198
}
225
-
226
- fn credential_repository ( & self ) -> & Self :: CredentialRepository {
227
- & self . auth_service
228
- }
229
199
}
230
200
231
201
#[ tokio:: test]
0 commit comments