Skip to content

Commit e47b135

Browse files
authored
Backport #2400 to 8.15 (#2403)
1 parent 4afa601 commit e47b135

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ test/bundlers/parcel-test/.parcel-cache
6464

6565
lib
6666
junit-output
67+
bun.lockb
68+
test-results
69+
processinfo

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"semver": "^7.3.7",
7676
"split2": "^4.1.0",
7777
"stoppable": "^1.1.0",
78-
"tap": "^16.1.0",
78+
"tap": "^21.0.1",
7979
"ts-node": "^10.7.0",
8080
"ts-standard": "^11.0.0",
8181
"typescript": "^4.6.4",
@@ -88,10 +88,9 @@
8888
"tslib": "^2.4.0"
8989
},
9090
"tap": {
91-
"ts": true,
92-
"jsx": false,
93-
"flow": false,
94-
"coverage": false,
95-
"check-coverage": false
91+
"disable-coverage": true,
92+
"files": [
93+
"test/unit/{*,**/*}.test.ts"
94+
]
9695
}
9796
}

test/unit/client.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,12 @@ test('Elastic Cloud config', t => {
293293
})
294294

295295
t.ok(client.connectionPool instanceof CloudConnectionPool)
296-
t.match(client.connectionPool.connections.find(c => c.id === 'https://abcd.localhost/'), {
297-
url: new URL('https://elastic:changeme@abcd.localhost'),
298-
id: 'https://abcd.localhost/',
299-
headers: {
300-
authorization: 'Basic ' + Buffer.from('elastic:changeme').toString('base64')
301-
},
302-
tls: { secureProtocol: 'TLSv1_2_method' }
303-
})
296+
const connection = client.connectionPool.connections.find(c => c.id === 'https://abcd.localhost/')
297+
298+
t.equal(connection?.headers?.authorization, `Basic ${Buffer.from('elastic:changeme').toString('base64')}`)
299+
t.same(connection?.tls, { secureProtocol: 'TLSv1_2_method' })
300+
t.equal(connection?.url.hostname, 'abcd.localhost')
301+
t.equal(connection?.url.protocol, 'https:')
304302

305303
t.end()
306304
})

0 commit comments

Comments
 (0)