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