nodejitsu/pkgcloud — pull request #42 by stammen (2012-11-28 20:24:22+00:00)
Title: Updated azure server code to better test when azure vm is actually running.

Changes to the azure code were made to better indicate the true status of the azure VM. Azure actually indicates state of vm in two different places. I previously only looked at the state of the deployment. I need to look at the state of the azure vm role to properly test if the server is running.

The Azure Nock urls were updated to handle new server state code. Azure nock code was cleaned up and simplified. Azure createServer test was updated to use vows and setWait(). rebootServer was also updated to vows and uses setWait().

In testing this code, a bug was discovered in azureApi.pollRequestStatus() when looking at the response from polling the server status. I need to examine body.Error and not res.body.Error when an error is returned in the poll request.

All tests pass with npm test.
All tests pass with live azure cloud.