Skip to content

Commit bd13a2b

Browse files
committed
Fix TLS tests in Node
Couple TLS tests got broken when executed against 3.1 neo4j database, which generates self-signed certificate for default listen address in neo4j-server. Default listen address has been changed from IPV4 localhost to IPv6 localhost '::' to verify IPv6 support. This change made 3.1 database generate self-signed certificate with '::' hostname. Tests however tried to connect to regular 'bolt://localhost' and hostname validation failed because they expected 'localhost' but received certificate with '::'. Starting from 3.2 neo4j generates self-signed certificates based on the advertised address, which we do not change for tests and thus it's always 'localhost'. This commit fixes the problem by adding an explicit listen address for http with IPv4 localhost and default port 7474 to the neo4j config file.
1 parent 25dc55b commit bd13a2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/internal/shared-neo4j.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ const authToken = neo4j.auth.basic(username, password);
102102

103103
const additionalConfig = {
104104
// tell neo4j to listen for IPv6 connections, only supported by 3.1+
105-
'dbms.connectors.default_listen_address': '::'
105+
'dbms.connectors.default_listen_address': '::',
106+
107+
// HTTP server should keep listening on default address and create a self-signed certificate with host 'localhost'
108+
'dbms.connector.http.listen_address': 'localhost:7474'
106109
};
107110

108111
const neoCtrlVersionParam = '-e';

0 commit comments

Comments
 (0)