Sha256: 084d75cebe14fe5d990f30071a459248a4a83311a53945491e10a814bbe2f2c6
Contents?: true
Size: 963 Bytes
Versions: 34
Compression:
Stored size: 963 Bytes
Contents
Shindo.tests('Fog::Compute[:digitalocean] | create_server request', ['digitalocean', 'compute']) do @server_format = { 'id' => Integer, 'name' => String, 'image_id' => Integer, 'size_id' => Integer, 'event_id' => Integer } service = Fog::Compute[:digitalocean] tests('success') do tests('#create_server').formats({'status' => 'OK', 'droplet' => @server_format}) do image = service.images.find { |i| i.name == 'Ubuntu 13.10 x64' } image_id = image.nil? ? 1505447 : image.id region = service.regions.find { |r| r.name == 'New York 1' } region_id = region.nil? ? 4 : region.id flavor = service.flavors.find { |r| r.name == '512MB' } flavor_id = flavor.nil? ? 66 : flavor.id data = Fog::Compute[:digitalocean].create_server( fog_server_name, flavor_id, image_id, region_id ) data.body end end end
Version data entries
34 entries across 34 versions & 5 rubygems