/** * @covers WindowsAzure\ServiceManagement\Models\GetDeploymentOptions::setDeploymentName * @covers WindowsAzure\ServiceManagement\Models\GetDeploymentOptions::getDeploymentName */ public function testSetDeploymentName() { // Setup $expected = 'my deployment'; $options = new GetDeploymentOptions(); // Test $options->setDeploymentName($expected); // Assert $this->assertEquals($expected, $options->getDeploymentName()); }
public function deleteDeployment($name, $slot = null) { $options = new GetDeploymentOptions(); $options->setSlot(is_null($slot) ? $this->defaultSlot : $slot); $result = $this->restProxy->deleteDeployment($name, $options); $this->blockUntilAsyncSucceed($result); }
/** * @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()); }