@@ -34,6 +34,8 @@ describe('Security Check Groups', () => {
3434 config . allowClientClassCreation = false ;
3535 config . enableInsecureAuthAdapters = false ;
3636 config . graphQLPublicIntrospection = false ;
37+ config . databaseAdapter = undefined ;
38+ config . databaseOptions = { allowPublicExplain : false } ;
3739 await reconfigureServer ( config ) ;
3840
3941 const group = new CheckGroupServerConfig ( ) ;
@@ -43,13 +45,16 @@ describe('Security Check Groups', () => {
4345 expect ( group . checks ( ) [ 2 ] . checkState ( ) ) . toBe ( CheckState . success ) ;
4446 expect ( group . checks ( ) [ 4 ] . checkState ( ) ) . toBe ( CheckState . success ) ;
4547 expect ( group . checks ( ) [ 5 ] . checkState ( ) ) . toBe ( CheckState . success ) ;
48+ expect ( group . checks ( ) [ 6 ] . checkState ( ) ) . toBe ( CheckState . success ) ;
4649 } ) ;
4750
4851 it ( 'checks fail correctly' , async ( ) => {
4952 config . masterKey = 'insecure' ;
5053 config . security . enableCheckLog = true ;
5154 config . allowClientClassCreation = true ;
5255 config . graphQLPublicIntrospection = true ;
56+ config . databaseAdapter = undefined ;
57+ config . databaseOptions = { allowPublicExplain : true } ;
5358 await reconfigureServer ( config ) ;
5459
5560 const group = new CheckGroupServerConfig ( ) ;
@@ -59,6 +64,7 @@ describe('Security Check Groups', () => {
5964 expect ( group . checks ( ) [ 2 ] . checkState ( ) ) . toBe ( CheckState . fail ) ;
6065 expect ( group . checks ( ) [ 4 ] . checkState ( ) ) . toBe ( CheckState . fail ) ;
6166 expect ( group . checks ( ) [ 5 ] . checkState ( ) ) . toBe ( CheckState . fail ) ;
67+ expect ( group . checks ( ) [ 6 ] . checkState ( ) ) . toBe ( CheckState . fail ) ;
6268 } ) ;
6369 } ) ;
6470
0 commit comments