Skip to content

Commit

Permalink
test: Updated tls redis tests to work with older versions of redis v4 (
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 authored Aug 12, 2024
1 parent 9a16b70 commit ffd9b17
Showing 1 changed file with 15 additions and 23 deletions.
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

0 comments on commit ffd9b17

Please sign in to comment.