@@ -141,60 +141,7 @@ describe('trust-on-first-use', function() {
141141 done ( ) ;
142142 } ) ;
143143 } ) ;
144-
145- it ( 'should not duplicate fingerprint entries' , function ( done ) {
146- // Assuming we only run this test on NodeJS with TOFU support
147- if ( ! hasFeature ( "trust_on_first_use" ) ) {
148- done ( ) ;
149- return ;
150- }
151-
152- // Given
153- var knownHostsPath = "build/known_hosts" ;
154- if ( fs . existsSync ( knownHostsPath ) ) {
155- fs . unlinkSync ( knownHostsPath ) ;
156- }
157- fs . writeFileSync ( knownHostsPath , '' ) ;
158-
159- driver = neo4j . driver ( "bolt://localhost" , neo4j . auth . basic ( "neo4j" , "neo4j" ) , {
160- encrypted : true ,
161- trust : "TRUST_ON_FIRST_USE" ,
162- knownHosts : knownHostsPath
163- } ) ;
164-
165- // When
166- driver . session ( ) ;
167- driver . session ( ) ;
168-
169- setTimeout ( function ( ) {
170- var lines = { } ;
171- fs . readFileSync ( knownHostsPath , 'utf8' )
172- . split ( '\n' )
173- . filter ( function ( line ) {
174- return ! ! ( line . trim ( ) ) ;
175- } )
176- . forEach ( function ( line ) {
177- if ( ! lines [ line ] ) {
178- lines [ line ] = 0 ;
179- }
180- lines [ line ] ++ ;
181- } ) ;
182-
183- var duplicatedLines = Object
184- . keys ( lines )
185- . map ( function ( line ) {
186- return lines [ line ] ;
187- } )
188- . filter ( function ( count ) {
189- return count > 1 ;
190- } )
191- . length ;
192-
193- expect ( duplicatedLines ) . toBe ( 0 ) ;
194- done ( ) ;
195- } , 1000 ) ;
196- } ) ;
197-
144+
198145 it ( 'should should give helpful error if database cert does not match stored certificate' , function ( done ) {
199146 // Assuming we only run this test on NodeJS with TOFU support
200147 if ( ! hasFeature ( "trust_on_first_use" ) ) {
0 commit comments