File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
compass-e2e-tests/helpers Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,11 @@ export const getAtlasCloudSandboxDefaultConnections = (
208208 str . password = dbPassword ;
209209 return {
210210 id : name ,
211- connectionOptions : { connectionString : String ( str ) } ,
211+ connectionOptions : {
212+ connectionString : String ( str ) ,
213+ // System CA certificates are not available in the browser environment
214+ useSystemCA : false ,
215+ } ,
212216 favorite : { name } ,
213217 } ;
214218 } ) ;
Original file line number Diff line number Diff line change @@ -36,11 +36,31 @@ class SandboxConnectionStorage implements ConnectionStorage {
3636 return [ info . id , info ] ;
3737 } )
3838 ) ;
39+
40+ // Ensure useSystemCA is set to false for all connections since system CA
41+ // certificates are not available in the browser environment
42+ private normalizeConnectionInfo ( info : ConnectionInfo ) : ConnectionInfo {
43+ return {
44+ ...info ,
45+ connectionOptions : {
46+ ...info . connectionOptions ,
47+ useSystemCA : false ,
48+ } ,
49+ } ;
50+ }
51+
3952 loadAll ( ) : Promise < ConnectionInfo [ ] > {
40- return Promise . resolve ( Array . from ( this . _connections . values ( ) ) ) ;
53+ return Promise . resolve (
54+ Array . from ( this . _connections . values ( ) ) . map ( ( info ) =>
55+ this . normalizeConnectionInfo ( info )
56+ )
57+ ) ;
4158 }
4259 load ( { id } : { id : string } ) : Promise < ConnectionInfo | undefined > {
43- return Promise . resolve ( this . _connections . get ( id ) ) ;
60+ const info = this . _connections . get ( id ) ;
61+ return Promise . resolve (
62+ info ? this . normalizeConnectionInfo ( info ) : undefined
63+ ) ;
4464 }
4565 save ( { connectionInfo } : { connectionInfo : ConnectionInfo } ) : Promise < void > {
4666 this . _connections . set ( connectionInfo . id , connectionInfo ) ;
You can’t perform that action at this time.
0 commit comments