@@ -39,7 +39,8 @@ const getSettings = (test = null) => {
39
39
databaseId : 'CosmosPartitionedStorageTestDb' ,
40
40
containerId : `CosmosPartitionedStorageTestContainer-${ testId } ` ,
41
41
cosmosClientOptions : {
42
- agent : new https . Agent ( { rejectUnauthorized : false } ) , // rejectUnauthorized disables the SSL verification for the locally-hosted Emulator
42
+ // rejectUnauthorized disables the SSL verification for the locally-hosted Emulator
43
+ agent : new https . Agent ( { rejectUnauthorized : false } ) , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
43
44
} ,
44
45
} ;
45
46
} ;
@@ -53,7 +54,7 @@ const checkEmulator = async () => {
53
54
} else {
54
55
try {
55
56
const agent = new https . Agent ( {
56
- rejectUnauthorized : false ,
57
+ rejectUnauthorized : false , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
57
58
} ) ;
58
59
await fetch ( emulatorEndpoint , { agent } ) ;
59
60
canConnectToEmulator = true ;
@@ -84,7 +85,7 @@ const cleanup = async () => {
84
85
const client = new CosmosClient ( {
85
86
endpoint : settings . cosmosDbEndpoint ,
86
87
key : settings . authKey ,
87
- agent : new https . Agent ( { rejectUnauthorized : false } ) ,
88
+ agent : new https . Agent ( { rejectUnauthorized : false } ) , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
88
89
} ) ;
89
90
try {
90
91
await client . database ( settings . databaseId ) . delete ( ) ;
@@ -111,7 +112,7 @@ const prep = async function () {
111
112
const client = new CosmosClient ( {
112
113
endpoint : settings . cosmosDbEndpoint ,
113
114
key : settings . authKey ,
114
- agent : new https . Agent ( { rejectUnauthorized : false } ) ,
115
+ agent : new https . Agent ( { rejectUnauthorized : false } ) , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
115
116
} ) ;
116
117
117
118
// This throws if the db is already created. We want to always create it if it doesn't exist,
@@ -190,7 +191,7 @@ describe('CosmosDbPartitionedStorage', function () {
190
191
191
192
const settingsWithClientOptions = getSettings ( this . test ) ;
192
193
settingsWithClientOptions . cosmosClientOptions = {
193
- agent : new https . Agent ( { rejectUnauthorized : false } ) ,
194
+ agent : new https . Agent ( { rejectUnauthorized : false } ) , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
194
195
connectionPolicy : { requestTimeout : 999 } ,
195
196
userAgentSuffix : 'test' ,
196
197
} ;
@@ -209,7 +210,7 @@ describe('CosmosDbPartitionedStorage', function () {
209
210
210
211
const settingsWithClientOptions = getSettings ( this . test ) ;
211
212
settingsWithClientOptions . cosmosClientOptions = {
212
- agent : new https . Agent ( { rejectUnauthorized : false } ) ,
213
+ agent : new https . Agent ( { rejectUnauthorized : false } ) , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
213
214
connectionPolicy : { requestTimeout : 999 } ,
214
215
} ;
215
216
@@ -340,7 +341,7 @@ describe('CosmosDbPartitionedStorage', function () {
340
341
const dbCreateClient = new CosmosClient ( {
341
342
endpoint : settingsWithNewDb . cosmosDbEndpoint ,
342
343
key : settingsWithNewDb . authKey ,
343
- agent : new https . Agent ( { rejectUnauthorized : false } ) ,
344
+ agent : new https . Agent ( { rejectUnauthorized : false } ) , // CodeQL [SM03616] Used only in tests with local cosmosdb emulator
344
345
} ) ;
345
346
try {
346
347
await dbCreateClient . database ( newDb ) . delete ( ) ;
0 commit comments