Skip to content

Commit

Permalink
fix read ssl in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NunuM committed Sep 5, 2023
1 parent 3d357ac commit 9d02165
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ describe('Proxy test', () => {
const proxyService = new ProxyService(gatewayHostService);

proxyService.httpsProxy(9999, {
key: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-cert.pem'))
key: path.join(__dirname, 'ssl', 'localhost-privkey.pem'),
cert: path.join(__dirname, 'ssl', 'localhost-cert.pem')
});

proxyService.serve();
Expand Down Expand Up @@ -361,8 +361,8 @@ describe('Proxy test', () => {
const proxyService = new ProxyService(gatewayHostService);

proxyService.httpsProxy(9999, {
key: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-cert.pem'))
key: path.join(__dirname, 'ssl', 'localhost-privkey.pem'),
cert: path.join(__dirname, 'ssl', 'localhost-cert.pem')
});

proxyService.serve();
Expand Down Expand Up @@ -433,8 +433,8 @@ describe('Proxy test', () => {
const proxyService = new ProxyService(gatewayHostService);

proxyService.httpsProxy(9999, {
key: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-cert.pem'))
key: path.join(__dirname, 'ssl', 'localhost-privkey.pem'),
cert: path.join(__dirname, 'ssl', 'localhost-cert.pem')
});

proxyService.serve();
Expand Down Expand Up @@ -505,8 +505,8 @@ describe('Proxy test', () => {
const proxyService = new ProxyService(gatewayHostService);

proxyService.http2Proxy(9999, {
key: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-cert.pem'))
key: path.join(__dirname, 'ssl', 'localhost-privkey.pem'),
cert: path.join(__dirname, 'ssl', 'localhost-cert.pem')
});

proxyService.serve();
Expand Down Expand Up @@ -575,8 +575,8 @@ describe('Proxy test', () => {
const proxyService = new ProxyService(gatewayHostService);

proxyService.http2Proxy(9999, {
key: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-cert.pem'))
key: path.join(__dirname, 'ssl', 'localhost-privkey.pem'),
cert: path.join(__dirname, 'ssl', 'localhost-cert.pem')
});

proxyService.serve();
Expand Down Expand Up @@ -645,8 +645,8 @@ describe('Proxy test', () => {
const proxyService = new ProxyService(gatewayHostService);

proxyService.http2Proxy(9999, {
key: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, 'ssl', 'localhost-cert.pem'))
key: path.join(__dirname, 'ssl', 'localhost-privkey.pem'),
cert: path.join(__dirname, 'ssl', 'localhost-cert.pem')
});

proxyService.serve();
Expand Down

0 comments on commit 9d02165

Please sign in to comment.