Skip to content

Commit

Permalink
test: remove tls for benchwrapper (#816)
Browse files Browse the repository at this point in the history
We found a way to whitelist our usage of tls-less gRPC within g3, so this is
no longer necessary. Huzzah!
  • Loading branch information
jeanbza authored and JustinBeckwith committed Aug 19, 2019
1 parent 604e564 commit 0eb689f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 57 deletions.
2 changes: 1 addition & 1 deletion bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ bencharmking purposes.
cd nodejs-storage
npm install
export STORAGE_EMULATOR_HOST=localhost:8080
npm run benchwrapper -- --port 50051
npm run benchwrapper -- --port 8081
```
11 changes: 1 addition & 10 deletions bin/benchwrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

const fs = require('fs');
const path = require('path');
const grpc = require('grpc');
const protoLoader = require('@grpc/proto-loader');
const {Storage} = require('../build/src');
Expand Down Expand Up @@ -59,19 +57,12 @@ function write(call, callback) {
callback(null, null);
}

const keyPath = path.join(__dirname, 'certificate', 'server.key');
const key = fs.readFileSync(keyPath);
const certPath = path.join(__dirname, 'certificate', 'server.pem');
const cert = fs.readFileSync(certPath);
const pair = {private_key: key, cert_chain: cert};
const creds = grpc.ServerCredentials.createSsl(cert, [pair]);

const server = new grpc.Server();

server.addService(storageBenchWrapper['StorageBenchWrapper']['service'], {
read: read,
write: write,
});
console.log('starting on localhost:' + argv.port);
server.bind('0.0.0.0:' + argv.port, creds);
server.bind('0.0.0.0:' + argv.port, grpc.ServerCredentials.createInsecure());
server.start();
27 changes: 0 additions & 27 deletions bin/certificate/server.key

This file was deleted.

19 changes: 0 additions & 19 deletions bin/certificate/server.pem

This file was deleted.

0 comments on commit 0eb689f

Please sign in to comment.