/** * @covers WindowsAzure\ServiceManagement\Models\CreateDeploymentOptions::setStartDeployment * @covers WindowsAzure\ServiceManagement\Models\CreateDeploymentOptions::getStartDeployment */ public function testSetStartDeployment() { // Setup $expected = true; $options = new CreateDeploymentOptions(); // Test $options->setStartDeployment($expected); // Assert $this->assertEquals($expected, $options->getStartDeployment()); }
/** * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::reimageRoleInstance * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getRoleInstancePath * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_sendRoleInstanceOrder * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getDeploymentPath * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getPath * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_createRequestXml * @covers WindowsAzure\ServiceManagement\Models\AsynchronousOperationResult::create * @group Deployment */ public function testReimageRoleInstance() { $this->markTestSkipped(ServiceRestProxyTestBase::TAKE_TOO_LONG); // Setup $name = $this->getTestName(); $roleName = 'WebRole1_IN_0'; $options = new CreateDeploymentOptions(); $options->setStartDeployment(true); $this->createDeployment($name, $this->defaultSlot, $name, $options); $options = new GetDeploymentOptions(); $options->setDeploymentName($name); $this->waitUntilDeploymentReachStatus($name, DeploymentStatus::RUNNING); $this->waitUntilRoleInstanceReachStatus($name, 'ReadyRole', $roleName); // Test $result = $this->restProxy->reimageRoleInstance($name, $roleName, $options); // Block until reboot request is completed $this->blockUntilAsyncSucceed($result); // Assert $result = $this->restProxy->getDeployment($name, $options); $deployment = $result->getDeployment(); $roleInstanceList = $deployment->getRoleInstanceList(); $webRoleInstance = $roleInstanceList[0]; $this->assertEquals('StoppedVM', $webRoleInstance->getInstanceStatus()); }