Closed misterdjules closed 5 years ago
Updated this PR with a second commit that:
test/lib/cli.js
like cli.exec
, cli.logs
and cli.kill
. cli.exec
replaces the previous cli.exec
which was renamed to cli.execInTestZone
.Closing as I won't be working on that and I don't think there's any interest in getting that merged.
The following endpoints:
were missing a
queryParser
handler to parse the query string. As a result, none of their query string parameters were used. This problem was the result of a previous change that moved thequeryParser
from thebefore
handlers to each specific endpoint that was using it.This PR adds the
queryParser
handler to these three endpoints, and adds some basic tests that were missing, and that would have helped us find that thequeryParser
handler was missing in the first place.In addition to these changes, this PR brings the following other notable changes:
containerStop
andcontainerRestart
endpoints, and for signal values in thecontainerKill
endpoint.test/lib/container.js
module that contains thecheckContainerStatus
function. This function is used to check if a container transitions to a given status and allows for a certain number of retries. This was needed in theapi-start-kill.js
integration test to make it non-flakey, since sometimes a killed container would not transition to thestopped
status before we'd check its status.This PR needs to land _after https://github.com/joyent/sdc-vmapi/pull/22, since otherwise it would pass numeric signal such as
'9'
as strings, which VMAPI doesn't accept before https://github.com/joyent/sdc-vmapi/pull/22.