Skip to content

testkit-backend: Test only the TLS versions available in the system #799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion packages/testkit-backend/src/request-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ import neo4j from './neo4j'
import ResultObserver from './result-observer.js'
import { cypherToNative, nativeToCypher } from './cypher-native-binders.js'
import { shouldRunTest } from './skipped-tests'
import tls from 'tls'

const SUPPORTED_TLS = (() => {
const min = Number(tls.DEFAULT_MIN_VERSION.split('TLSv')[1])
const max = Number(tls.DEFAULT_MAX_VERSION.split('TLSv')[1])
const result = [];
for (let version = min; version <= max; version = Number((version + 0.1).toFixed(1)) ) {
result.push(`Feature:TLS:${version.toFixed(1)}`)
}
return result;
})();

export function NewDriver (context, data, { writeResponse }) {
const {
Expand Down Expand Up @@ -268,7 +279,8 @@ export function GetFeatures (_context, _params, wire) {
'AuthorizationExpiredTreatment',
'ConfHint:connection.recv_timeout_seconds',
'Feature:Bolt:4.4',
'Feature:Impersonation'
'Feature:Impersonation',
...SUPPORTED_TLS
]
})
}
Expand Down