/** * Test create an instance */ public function testCreateInstance() { $options = array(Zend_Cloud_Infrastructure_Instance::INSTANCE_IMAGEID => 'ami-7f418316', Zend_Cloud_Infrastructure_Adapter_Ec2::AWS_SECURITY_GROUP => array('default')); $instance = $this->infrastructure->createInstance('test', $options); self::$instanceId = $instance->getId(); $this->assertEquals('ami-7f418316', $instance->getImageId()); }
/** * Test create an instance */ public function testCreateInstance() { $options = array('imageId' => constant('TESTS_ZEND_SERVICE_RACKSPACE_SERVER_IMAGEID'), 'flavorId' => constant('TESTS_ZEND_SERVICE_RACKSPACE_SERVER_FLAVORID'), 'metadata' => array('foo' => 'bar')); $instance = $this->infrastructure->createInstance(constant('TESTS_ZEND_SERVICE_RACKSPACE_SERVER_IMAGE_NAME'), $options); self::$instanceId = $instance->getId(); $this->assertEquals(constant('TESTS_ZEND_SERVICE_RACKSPACE_SERVER_IMAGEID'), $instance->getImageId()); }