Mercurial > hg > thermostat-ng > web-client
changeset 237:68d7308271aa
Fix kill_vm mockapi command endpoint
Reviewed-by: jerboaa
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025267.html
author | Andrew Azores <aazores@redhat.com> |
---|---|
date | Wed, 04 Oct 2017 10:23:50 -0400 |
parents | 56824b639e54 |
children | e905e459ea48 |
files | mock-api/endpoints/kill-vm.command.endpoint.js mock-api/mockapi.server.js |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mock-api/endpoints/kill-vm.command.endpoint.js Tue Oct 03 12:28:42 2017 -0400 +++ b/mock-api/endpoints/kill-vm.command.endpoint.js Wed Oct 04 10:23:50 2017 -0400 @@ -1,6 +1,6 @@ function killVm (server) { server.init('kill-vm-command'); - server.app.ws('/commands/v1/actions/kill-vm/systems/:systemId/agents/:agentId/jvms/:jvmId/sequence/:seqId', function (ws, req) { + server.app.ws('/commands/v1/actions/kill_vm/systems/:systemId/agents/:agentId/jvms/:jvmId/sequence/:seqId', function (ws, req) { server.logRequest('kill-vm-command', req); ws.on('message', function (msg) { ws.send(JSON.stringify(
--- a/mock-api/mockapi.server.js Tue Oct 03 12:28:42 2017 -0400 +++ b/mock-api/mockapi.server.js Wed Oct 04 10:23:50 2017 -0400 @@ -12,6 +12,9 @@ var app = express(); expressWs(app); app.use(cors()); + +// express-ws does not work when basicAuth is enabled. If testing command channel +// (or other websocket) functionality, temporarily remove the configuration below. app.use(basicAuth({ users: { 'client': 'client-pwd'