Skip to content

Commit 62fd0ea

Browse files
Jake ChampionJakeChampion
authored andcommitted
fix: correct type definition for the global BackendConfiguration type - there is no checkCertificate field
This field never existed in the released version of our Backend implementation, it is a remnant of a previous approach I was taking, I somehow forgot to remove the tests and type definition
1 parent 2f66118 commit 62fd0ea

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

integration-tests/js-compute/fixtures/app/src/dynamic-backend.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,28 +1287,6 @@ routes.set("/backend/timeout", async () => {
12871287
});
12881288
}
12891289

1290-
// checkCertificate property
1291-
{
1292-
routes.set("/backend/constructor/parameter-checkCertificate-property-valid-boolean", async () => {
1293-
const types = [{}, [], Symbol(), 1, "2"];
1294-
for (const type of types) {
1295-
let error = assertDoesNotThrow(() => {
1296-
new Backend({ name: 'checkCertificate-property-valid-boolean' + String(type), target: 'a', checkCertificate: type })
1297-
})
1298-
if (error) { return error }
1299-
}
1300-
let error = assertDoesNotThrow(() => {
1301-
new Backend({ name: 'checkCertificate-property-valid-boolean-true', target: 'a', checkCertificate: true })
1302-
})
1303-
if (error) { return error }
1304-
error = assertDoesNotThrow(() => {
1305-
new Backend({ name: 'checkCertificate-property-valid-boolean-false', target: 'a', checkCertificate: false })
1306-
})
1307-
if (error) { return error }
1308-
return pass('ok')
1309-
});
1310-
}
1311-
13121290
// caCertificate property
13131291
{
13141292
routes.set("/backend/constructor/parameter-caCertificate-property-empty-string", async () => {

integration-tests/js-compute/fixtures/app/tests.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,17 +2736,6 @@
27362736
"body": "ok"
27372737
}
27382738
},
2739-
"GET /backend/constructor/parameter-checkCertificate-property-valid-boolean": {
2740-
"environments": ["viceroy"],
2741-
"downstream_request": {
2742-
"method": "GET",
2743-
"pathname": "/backend/constructor/parameter-checkCertificate-property-valid-boolean"
2744-
},
2745-
"downstream_response": {
2746-
"status": 200,
2747-
"body": "ok"
2748-
}
2749-
},
27502739
"GET /backend/constructor/parameter-caCertificate-property-empty-string": {
27512740
"environments": ["viceroy"],
27522741
"downstream_request": {

test-d/.test-d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ import { expectError, expectType } from 'tsd';
9797
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', tlsMinVersion: 1.2,}))
9898
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', tlsMaxVersion: 1.2,}))
9999
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', certificateHostname: 'example.com',}))
100-
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', checkCertificate: false,}))
101100
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', caCertificate: '',}))
102101
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', ciphers: 'DEFAULT',}))
103102
expectType<Backend>(new Backend({name: 'eu', target: 'www.example.com', sniHostname: 'example.com',}))

types/globals.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ declare interface BackendConfiguration {
9090
* Define the hostname that the server certificate should declare.
9191
*/
9292
certificateHostname?: string,
93-
/**
94-
* Whether or not to validate the server certificate.
95-
* Highly recommended to enable this if `useSSL` is set to `true`.
96-
*/
97-
checkCertificate?: boolean,
9893
/**
9994
* The CA certificate to use when checking the validity of the backend.
10095
*/

0 commit comments

Comments
 (0)