fix(bazel): protractor utils cannot start server on windows (#27915)
* Currently the protractor utils assume that the specified Bazel server runfile can be resolved by just using the real file system. This is not the case on Windows because the runfiles are not symlinked into the working directory and need to be resolved through the runfile manifest. PR Close #27915
This commit is contained in:

committed by
Kara Erickson

parent
4613864fc8
commit
9de9c8ad03
23
packages/bazel/test/protractor-utils/fake-devserver.js
Normal file
23
packages/bazel/test/protractor-utils/fake-devserver.js
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
const http = require('http');
|
||||
const minimist = require('minimist');
|
||||
|
||||
const {port} = minimist(process.argv);
|
||||
const server = new http.Server();
|
||||
|
||||
// Basic request handler so that it could respond to fake requests.
|
||||
server.on('request', (req, res) => {
|
||||
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||||
res.end('Running');
|
||||
});
|
||||
|
||||
server.listen(port);
|
||||
|
||||
console.info('Server running on port:', port);
|
Reference in New Issue
Block a user