Skip to content

Commit 0b9cba1

Browse files
authored
Remove unused knownHost config (#1335)
1 parent 0e6236d commit 0b9cba1

File tree

6 files changed

+0
-27
lines changed

6 files changed

+0
-27
lines changed

packages/bolt-connection/src/channel/channel-config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export default class ChannelConfig {
5353
this.encrypted = extractEncrypted(driverConfig)
5454
this.trust = extractTrust(driverConfig)
5555
this.trustedCertificates = extractTrustedCertificates(driverConfig)
56-
this.knownHostsPath = extractKnownHostsPath(driverConfig)
5756
this.connectionErrorCode = connectionErrorCode || SERVICE_UNAVAILABLE
5857
this.connectionTimeout = driverConfig.connectionTimeout
5958
this.clientCertificate = clientCertificate
@@ -83,7 +82,3 @@ function extractTrust (driverConfig) {
8382
function extractTrustedCertificates (driverConfig) {
8483
return driverConfig.trustedCertificates || []
8584
}
86-
87-
function extractKnownHostsPath (driverConfig) {
88-
return driverConfig.knownHosts || null
89-
}

packages/core/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export class Config {
6666
encrypted?: boolean | EncryptionLevel
6767
trust?: TrustStrategy
6868
trustedCertificates?: string[]
69-
knownHosts?: string
7069
fetchSize?: number
7170
maxConnectionPoolSize?: number
7271
maxTransactionRetryTime?: number

packages/neo4j-driver-deno/lib/bolt-connection/channel/channel-config.js

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/neo4j-driver-deno/lib/core/types.ts

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/neo4j-driver/test/internal/channel-config.test.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ describe('#unit ChannelConfig', () => {
6363
expect(config.trustedCertificates).toEqual(trustedCertificates)
6464
})
6565

66-
it('should respect given known hosts', () => {
67-
const knownHostsPath = '~/.neo4j/known_hosts'
68-
69-
const config = new ChannelConfig(null, { knownHosts: knownHostsPath }, '')
70-
71-
expect(config.knownHostsPath).toEqual(knownHostsPath)
72-
})
73-
7466
it('should respect given connection error code', () => {
7567
const connectionErrorCode = 'ConnectionFailed'
7668

@@ -97,12 +89,6 @@ describe('#unit ChannelConfig', () => {
9789
expect(config.trustedCertificates).toEqual([])
9890
})
9991

100-
it('should have null known hosts path when not configured', () => {
101-
const config = new ChannelConfig(null, {}, '')
102-
103-
expect(config.knownHostsPath).toBeNull()
104-
})
105-
10692
it('should have service unavailable as default error code', () => {
10793
const config = new ChannelConfig(null, {}, '')
10894

packages/neo4j-driver/test/types/driver.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ const config: Config = dummy
5454
const encrypted: undefined | boolean | EncryptionLevel = config.encrypted
5555
const trust: undefined | TrustStrategy = config.trust
5656
const trustedCertificates: undefined | string[] = config.trustedCertificates
57-
const knownHosts: undefined | string = config.knownHosts
5857
const maxTransactionRetryTime: undefined | number =
5958
config.maxTransactionRetryTime
6059
const maxConnectionLifetime: undefined | number = config.maxConnectionLifetime

0 commit comments

Comments
 (0)