Skip to content

test: Updated tls redis tests to work with older versions of redis v4 #2454

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 1 commit into from
Aug 12, 2024
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
38 changes: 15 additions & 23 deletions test/versioned/redis/tls.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,14 @@ tap.test('redis over tls connection', (t) => {
const { promise, resolve } = promiseResolvers()
const agent = helper.instrumentMockedAgent()
const redis = require('redis')
const client = await redis
.createClient({
url: `rediss://${HOST}:${PORT}`,
socket: {
tls: true,
rejectUnauthorized: false
}
})
.on('error', (error) => {
throw error
})
.connect()
const client = redis.createClient({
url: `rediss://${HOST}:${PORT}`,
socket: {
tls: true,
rejectUnauthorized: false
}
})
await client.connect()
await client.flushAll()

t.teardown(async () => {
Expand All @@ -56,17 +52,13 @@ tap.test('redis over tls connection', (t) => {
const { promise, resolve } = promiseResolvers()
const agent = helper.instrumentMockedAgent()
const redis = require('redis')
const client = await redis
.createClient({
url: `rediss://${HOST}:${PORT}`,
socket: {
rejectUnauthorized: false
}
})
.on('error', (error) => {
throw error
})
.connect()
const client = redis.createClient({
url: `rediss://${HOST}:${PORT}`,
socket: {
rejectUnauthorized: false
}
})
await client.connect()
await client.flushAll()

t.teardown(async () => {
Expand Down
Loading