source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
fog/fog
https://github.com/fog/fog
tests/ibm/models/compute/image_tests.rb
Ruby
mit
4,298
master
644
Shindo.tests('Fog::Compute[:ibm] | image', ['ibm']) do @image_id = '20010001' @clone_name = 'fog-test-clone-image-' + Time.now.to_i.to_s(32) tests('success') do tests("Fog::Compute[:ibm].images.get('#{@image_id}')") do @image = Fog::Compute[:ibm].images.get(@image_id) returns(@image_id) { @imag...
github
fog/fog
https://github.com/fog/fog
tests/ibm/models/compute/locations_tests.rb
Ruby
mit
4,298
master
424
Shindo.tests('Fog::Compute[:ibm] | locations', ['ibm']) do tests('success') do @location_id = '41' tests('Fog::Compute[:ibm].locations') do returns(true) { Fog::Compute[:ibm].locations.length > 0 } end tests('Fog::Compute[:ibm].locations.get("#{@location_id}")') do @location = Fog::Com...
github
fog/fog
https://github.com/fog/fog
tests/ibm/models/compute/servers_tests.rb
Ruby
mit
4,298
master
1,127
Shindo.tests('Fog::Compute[:ibm] | servers', ['ibm']) do tests('success') do @name = "fog-test-instance-" + Time.now.to_i.to_s(32) @image_id = "20010001" @instance_type = "BRZ32.1/2048/60*175" @location_id = "41" @key_name = "fog-test-key-" + Time.now.to_i.to_s(32) ...
github
fog/fog
https://github.com/fog/fog
tests/ibm/models/compute/key_tests.rb
Ruby
mit
4,298
master
537
Shindo.tests('Fog::Compute[:ibm] | key', ['ibm']) do tests('success') do @key_name = 'fog-test-key-' + Time.now.to_i.to_s(32) @key = nil tests("Fog::Compute::IBM::Key.create(:name => '#{@key_name}')") do @key = Fog::Compute[:ibm].keys.create(:name => @key_name) returns(@key_name) { @ke...
github
fog/fog
https://github.com/fog/fog
tests/ibm/requests/compute/instance_tests.rb
Ruby
mit
4,298
master
3,425
Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do @instance_format = { 'name' => String, 'location' => String, 'keyName' => String, 'primaryIP' => { 'vlan' => Fog::Nullable::String, 'type' => Integer, 'ip' => String, ...
github
fog/fog
https://github.com/fog/fog
tests/ibm/requests/compute/location_tests.rb
Ruby
mit
4,298
master
617
Shindo.tests('Fog::Compute[:ibm] | location requests', ['ibm']) do @location_format = { 'state' => Integer, 'location' => String, 'capabilities' => Array, 'name' => String, 'id' => String, 'description' => String } @locations_format = { 'locations...
github
fog/fog
https://github.com/fog/fog
tests/ibm/requests/compute/key_tests.rb
Ruby
mit
4,298
master
1,815
Shindo.tests('Fog::Compute[:ibm] | key requests', ['ibm']) do @key_format = { 'default' => Fog::Boolean, 'instanceIds' => Array, 'keyMaterial' => String, 'keyName' => String, 'lastModifiedTime' => Integer } @keys_format = { 'keys' => [ @key_format ] ...
github
fog/fog
https://github.com/fog/fog
tests/ibm/requests/compute/vlan_tests.rb
Ruby
mit
4,298
master
362
Shindo.tests('Fog::Compute[:ibm] | location requests', ['ibm']) do @vlan_format = { 'id' => String, 'name' => String, 'location' => String, } @vlans_format = { 'vlan' => [ @vlan_format ] } tests('success') do tests("#list_vlans").formats(@vlans_format) do Fog::Compute[...
github
fog/fog
https://github.com/fog/fog
tests/ibm/requests/compute/image_tests.rb
Ruby
mit
4,298
master
3,182
Shindo.tests('Fog::Compute[:ibm] | image requests', ['ibm']) do @image_format = { 'state' => Integer, 'visibility' => String, 'platform' => String, 'owner' => String, 'architecture' => Fog::Nullable::String, 'createdTime' => Integer, 'location' => String, ...
github
fog/fog
https://github.com/fog/fog
tests/ibm/requests/compute/address_tests.rb
Ruby
mit
4,298
master
1,348
Shindo.tests('Fog::Compute[:ibm] | address requests', ['ibm']) do @address_format = { "state" => Integer, "offeringId"=> String, "location" => String, "ip" => String, "id" => String, "mode" => Integer, "hostname" => String, "type" => Integer, "instanc...
github
fog/fog
https://github.com/fog/fog
tests/rage4/requests/dns/dns_tests.rb
Ruby
mit
4,298
master
7,828
Shindo.tests('Fog::DNS[:rage4] | DNS requests', ['rage4', 'dns']) do @domain = '' @domain_id = nil @record_id = nil @domain_count = 0 @created_domain_list = [] tests("success") do test("get current domain count") do pending if Fog.mocking? response = Fog::DNS[:rage4].list_domains() ...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/helper.rb
Ruby
mit
4,298
master
542
def test_domain 'fog-dream.com' end def do_not_delete_record "do-not-delete.#{test_domain}" end ## Cleanup # We need to have at least one record defined for the Dreamhost DNS api to work # or you will get a no_such_zone runtime error # The first record needs to be created using the Dreamhost Web panel AFAIK # def...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/dns_tests.rb
Ruby
mit
4,298
master
666
Shindo.tests('Fog::DNS[:dreamhost]', ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] tests("collections") do %w{ records zones }.each do |collection| test("it should respond to #{collection}") { service.respond_to? collection } test("it should respond to #{collection}.all") { eval("service...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/requests/dns/create_record_tests.rb
Ruby
mit
4,298
master
986
Shindo.tests('Fog::DNS[:dreamhost] | create_record request', ['dreamhost', 'dns']) do tests("success") do test("create an A resource record without comment") do name = "foo.testing.#{test_domain}" type = "A" value = "1.2.3.4" response = Fog::DNS[:dreamhost].create_record(name, type, valu...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/requests/dns/delete_record_tests.rb
Ruby
mit
4,298
master
657
Shindo.tests('Fog::DNS[:dreamhost] | delete_record request', ['dreamhost', 'dns']) do tests("success") do test("delete testing records") do name = "delete-test.#{test_domain}" type = "A" value = "1.2.3.4" comment = "test" Fog::DNS[:dreamhost].create_record(name, type, value, commen...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/requests/dns/list_records_tests.rb
Ruby
mit
4,298
master
662
Shindo.tests('Fog::DNS[:dreamhost] | list_records request', ['dreamhost', 'dns']) do tests("success") do response = Fog::DNS[:dreamhost].list_records test("should return 200") do if response.status == 200 @records = response.body["data"] end (response.status == 200) and (response....
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/models/dns/records_tests.rb
Ruby
mit
4,298
master
689
Shindo.tests("Fog::DNS[:dreamhost] | records", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] tests('#all') do records = service.records test('should be an array') { records.is_a? Array } test('should not be empty') { !records.empty? } tests('should list Fog::DNS::Dreamhost::Record') d...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/models/dns/zones_tests.rb
Ruby
mit
4,298
master
660
Shindo.tests("Fog::DNS[:dreamhost] | Zones Collection", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] tests('#all') do zones = service.zones test('should be an array') { zones.is_a? Array } test('should not be empty') { !zones.empty? } tests('should list Fog::DNS::Dreamhost::Zone') do...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/models/dns/zone_tests.rb
Ruby
mit
4,298
master
1,597
Shindo.tests("Fog::DNS[:dreamhost] | zone", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] zone = service.zones.first tests('#attributes') do tests('should have') do model_attribute_hash = zone.attributes attributes = [ :domain, :id, ] attributes.each do |att...
github
fog/fog
https://github.com/fog/fog
tests/dreamhost/models/dns/record_tests.rb
Ruby
mit
4,298
master
2,035
Shindo.tests("Fog::DNS[:dreamhost] | record", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] record = service.records.first tests('#attributes') do tests('should have') do model_attribute_hash = record.attributes attributes = [ :name, :value, :zone, :typ...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/compute_tests.rb
Ruby
mit
4,298
master
599
Shindo.tests('Fog::Compute[:fogdocker]', ['fogdocker']) do compute = Fog::Compute[:fogdocker] tests("Compute collections") do %w{ servers images }.each do |collection| test("it should respond to #{collection}") { compute.respond_to? collection } end end tests("Compute requests") do %w{ api_...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/image_create_tests.rb
Ruby
mit
4,298
master
806
Shindo.tests("Fog::Compute[:fogdocker] | image_create request", 'fogdocker') do compute = Fog::Compute[:fogdocker] tests("Create image") do response = compute.image_create({'fromImage' => 'mattdm/fedora', 'repo'=>'test', 'tag'=>'create_image'}) test("should be a kind of Hash") { response.kind_of? Hash} ...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/image_search_tests.rb
Ruby
mit
4,298
master
478
Shindo.tests("Fog::Compute[:fogdocker] | image_search request", 'fogdocker') do compute = Fog::Compute[:fogdocker] tests("Search images") do response = compute.image_search('term' => 'test') test("should be a kind of Array") { response.kind_of? Array} test("Array elements should be a kind of Hash") {...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/container_commit_tests.rb
Ruby
mit
4,298
master
612
Shindo.tests("Fog::Compute[:fogdocker] | container_create request", 'fogdocker') do compute = Fog::Compute[:fogdocker] name_base = Time.now.to_i hash = compute.container_create(:name => 'fog-'+name_base.to_s, 'image' => 'mattdm/fedora:f19','Cmd' => ['date'] ) response = {} tests("Commit Container") do r...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/image_delete_tests.rb
Ruby
mit
4,298
master
746
Shindo.tests("Fog::Compute[:fogdocker] | image_delete request", 'fogdocker') do compute = Fog::Compute[:fogdocker] image_hash = compute.image_create({'fromImage' => 'mattdm/fedora', 'repo'=>'test', 'tag'=>'delete_image'}) tests("Delete image") do begin response = compute.image_delete(:id => image_hash...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/container_action_tests.rb
Ruby
mit
4,298
master
1,341
Shindo.tests("Fog::Compute[:fogdocker] | container_action request", 'fogdocker') do compute = Fog::Compute[:fogdocker] name = "fog-#{Time.now.to_i}" response = compute.container_create(:name => name, 'image' => 'mattdm/fedora:f19','Cmd' => ['date']) id = response['id'] tests("Start Container") do respon...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/container_create_tests.rb
Ruby
mit
4,298
master
818
Shindo.tests("Fog::Compute[:fogdocker] | container_create request", 'fogdocker') do compute = Fog::Compute[:fogdocker] name_base = Time.now.to_i tests("Create Container") do response = compute.container_create(:name => 'fog-'+name_base.to_s, 'image' => 'mattdm/fedora:f19','Cmd' => ['date'] ) test("shoul...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/api_version_tests.rb
Ruby
mit
4,298
master
250
Shindo.tests('Fog::Compute[:fogdocker] | api_version request', ['fogdocker']) do compute = Fog::Compute[:fogdocker] tests('The response should') do response = compute.api_version() test('be a Hash') { response.kind_of? Hash} end end
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/requests/compute/container_delete_tests.rb
Ruby
mit
4,298
master
564
Shindo.tests('Fog::Compute[:fogdocker] | container_delete request', ['fogdocker']) do compute = Fog::Compute[:fogdocker] container = compute.servers.create({'Image' => 'mattdm/fedora:f19', 'Cmd' => ['/bin/bash']}) tests('The response should') do response = compute.cont...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/models/compute/server_tests.rb
Ruby
mit
4,298
master
1,976
Shindo.tests('Fog::Compute[:fogdocker] | server model', ['fogdocker']) do compute = Fog::Compute[:fogdocker] server = compute.servers.create(:name => "fog-#{Time.now.to_i}", 'image' => 'mattdm/fedora:f19','Cmd' => ['date']) tests('The server model should') do tests('have the action') do test('reload')...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/models/compute/image_tests.rb
Ruby
mit
4,298
master
994
Shindo.tests('Fog::Compute[:fogdocker] | image model', ['fogdocker']) do images = Fog::Compute[:fogdocker].images image = images.last.reload tests('The image model should') do tests('have the action') do test('reload') { image.respond_to? 'reload' } end tests('have attributes') do model_...
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/models/compute/images_tests.rb
Ruby
mit
4,298
master
287
Shindo.tests('Fog::Compute[:fogdocker] | images collection', ['fogdocker']) do images = Fog::Compute[:fogdocker].images tests('The images collection') do test('should be a kind of Fog::Compute::Fogdocker::images') { images.kind_of? Fog::Compute::Fogdocker::Images } end end
github
fog/fog
https://github.com/fog/fog
tests/fogdocker/models/compute/servers_tests.rb
Ruby
mit
4,298
master
551
Shindo.tests('Fog::Compute[:fogdocker] | servers collection', ['fogdocker']) do servers = Fog::Compute[:fogdocker].servers tests('The servers collection') do test('should not be empty') { not servers.empty? } test('should be a kind of Fog::Compute::Fogdocker::Servers') { servers.kind_of? Fog::Compute::Fog...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/datacenter_tests.rb
Ruby
mit
4,298
master
457
Shindo.tests('Fog::Compute[:linode] | datacenter requests', ['linode']) do @datacenters_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'DATACENTERID' => Integer, 'LOCATION' => String, 'ABBR' => String }] }) tests('success') do tests('#avail_datacenter...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/kernel_tests.rb
Ruby
mit
4,298
master
533
Shindo.tests('Fog::Compute[:linode] | kernel requests', ['linode']) do @kernels_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'LABEL' => String, 'ISXEN' => Integer, 'ISKVM' => Integer, 'ISPVOPS' => Integer, 'KERNE...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/nodebalancers_tests.rb
Ruby
mit
4,298
master
478
Shindo.tests('Fog::Compute[:linode] | linodenodebalancers requests', ['linode']) do @linodenodebalancers_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'MONTHLY' => Float, 'HOURLY' => Float, 'CONNECTIONS' => Integer }] }) tests('success') do tests('#avail_n...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/linode_tests.rb
Ruby
mit
4,298
master
7,090
Shindo.tests('Fog::Compute[:linode] | linode requests', ['linode']) do @linode_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => { 'LinodeID' => Integer } }) @linodes_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'ALERT_BWIN_ENABLED' => Integer, 'ALERT_CPU_THRES...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/linodeplans_tests.rb
Ruby
mit
4,298
master
1,097
Shindo.tests('Fog::Compute[:linode] | linodeplans requests', ['linode']) do @linodeplans_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'AVAIL' => { '2' => Integer, '3' => Integer, '4' => Integer, '6' => Integer, '7' => Integer, '8' ...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/distribution_tests.rb
Ruby
mit
4,298
master
912
Shindo.tests('Fog::Compute[:linode] | distribution requests', ['linode']) do @distributions_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'CREATE_DT' => String, 'DISTRIBUTIONID' => Integer, 'IS64BIT' => Integer, 'LABEL' => String, ...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/compute/stackscripts_tests.rb
Ruby
mit
4,298
master
1,094
Shindo.tests('Fog::Compute[:linode] | stack_script requests', ['linode']) do @stack_scripts_format = Linode::Compute::Formats::BASIC.merge({ 'DATA' => [{ 'STACKSCRIPTID' => Integer, 'SCRIPT' => String, 'DESCRIPTION' => String, 'DISTRIBUTIONIDLIST' => String, ...
github
fog/fog
https://github.com/fog/fog
tests/linode/requests/dns/dns_tests.rb
Ruby
mit
4,298
master
6,817
Shindo.tests('Fog::DNS[:linode] | DNS requests', ['linode', 'dns']) do @domain = '' @new_zones = [] @new_records =[] tests( 'success') do test('get current zone count') do pending if Fog.mocking? @org_zone_count= 0 response = Fog::DNS[:linode].domain_list() if response.status == ...
github
fog/fog
https://github.com/fog/fog
tests/dnsmadeeasy/requests/dns/dns_tests.rb
Ruby
mit
4,298
master
3,396
Shindo.tests('Fog::DNS[:dnsmadeeasy] | DNS requests', ['dnsmadeeasy', 'dns']) do @domain = '' @domain_count = 0 tests("success") do test("get current domain count") do pending if Fog.mocking? response = Fog::DNS[:dnsmadeeasy].list_domains() if response.status == 200 @domain_count...
github
fog/fog
https://github.com/fog/fog
tests/core/mocking_tests.rb
Ruby
mit
4,298
master
1,866
Shindo.tests('Fog mocking', 'core') do before do @fog_was_mocked = Fog.mock? Fog.unmock! if @fog_was_mocked end after do Fog.mock! if @fog_was_mocked end tests('Fog.mock!') do tests('Fog.mock!').returns(true) do Fog.mock! end tests('Fog.mock? without Fog.mock!').returns(false)...
github
fog/fog
https://github.com/fog/fog
tests/core/current_machine_tests.rb
Ruby
mit
4,298
master
782
Shindo.tests('Fog CurrentMachine', 'core') do pending unless Fog.mock? old_excon_defaults_mock = Excon.defaults[:mock] Excon.defaults[:mock] = true tests('ip_address') do tests('should be thread safe') do Excon.stub({:method => :get, :path => '/'}, {:body => ''}) (1..10).map { Threa...
github
fog/fog
https://github.com/fog/fog
tests/core/parser_tests.rb
Ruby
mit
4,298
master
2,245
Shindo.tests('Fog::Parsers', 'core') do class TestParser < Fog::Parsers::Base def reset super reset_my_array end def reset_my_array @my_array = [] end def end_element(name) case name when 'key1', 'key2', 'key3', 'longText' @response[name] = value when...
github
fog/fog
https://github.com/fog/fog
tests/core/wait_for_tests.rb
Ruby
mit
4,298
master
302
Shindo.tests('Fog#wait_for', 'core') do tests("success") do tests('Fog#wait_for').formats(:duration => Integer) do Fog.wait_for(1) { true } end end tests("failure") do tests('Fog#wait_for').raises(Fog::Errors::TimeoutError) do Fog.wait_for(2) { false } end end end
github
fog/fog
https://github.com/fog/fog
tests/core/attribute_tests.rb
Ruby
mit
4,298
master
1,923
class FogAttributeTestModel < Fog::Model attribute :key, :aliases => 'keys', :squash => "id" attribute :time, :type => :time attribute :bool, :type => :boolean end Shindo.tests('Fog::Attributes', 'core') do @model = FogAttributeTestModel.new tests('squash') do tests('"keys" => {:id => "value"}').retur...
github
fog/fog
https://github.com/fog/fog
tests/core/timeout_tests.rb
Ruby
mit
4,298
master
202
Shindo.tests('Fog#timeout', 'core') do tests('timeout').returns(FOG_TESTING_TIMEOUT) do Fog.timeout end tests('timeout = 300').returns(300) do Fog.timeout = 300 Fog.timeout end end
github
fog/fog
https://github.com/fog/fog
tests/core/uuid_tests.rb
Ruby
mit
4,298
master
265
Shindo.tests('Fog::UUID', 'core') do tests('supported?').succeeds do Fog::UUID.supported? == SecureRandom.respond_to?(:uuid) end tests('success').succeeds do Fog::UUID.uuid =~ /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/ end end
github
fog/fog
https://github.com/fog/fog
tests/core/credential_tests.rb
Ruby
mit
4,298
master
2,536
Shindo.tests do before do @old_home = ENV['HOME'] @old_rc = ENV['FOG_RC'] @old_credential = ENV['FOG_CREDENTIAL'] @old_credentials = Fog.credentials Fog.instance_variable_set('@credential_path', nil) # kill memoization Fog.instance_variable_set('@credential', nil) # kill memoization end ...
github
fog/fog
https://github.com/fog/fog
tests/core/service_tests.rb
Ruby
mit
4,298
master
632
Shindo.tests('Fog::Service', ['core']) do class TestService < Fog::Service recognizes :generic_user, :generic_api_key class Real attr_reader :options def initialize(opts={}) @options = opts end end class Mock < Real end end tests('Properly passes headers') do ...
github
fog/fog
https://github.com/fog/fog
tests/dns/helper.rb
Ruby
mit
4,298
master
943
def dns_providers { :aws => { :mocked => false }, :dnsimple => { :mocked => false }, :dnsmadeeasy => { :mocked => false }, :dynect => { :mocked => false, :zone_attributes => { :email => 'fog@example.com' } }, :linode ...
github
fog/fog
https://github.com/fog/fog
tests/dns/models/record_tests.rb
Ruby
mit
4,298
master
1,258
for provider, config in dns_providers # FIXME: delay/timing breaks things :( next if [:dnsmadeeasy, :rage4].include?(provider) domain_name = uniq_id + '.com' Shindo.tests("Fog::DNS[:#{provider}] | record", [provider.to_s]) do a_record_attributes = { :name => 'a.' + domain_name, :type => ...
github
fog/fog
https://github.com/fog/fog
tests/dns/models/zones_tests.rb
Ruby
mit
4,298
master
429
for provider, config in dns_providers # FIXME: delay/timing breaks things :( next if [:dnsmadeeasy, :rage4].include?(provider) domain_name = uniq_id + '.com' Shindo.tests("Fog::DNS[:#{provider}] | zones", [provider.to_s]) do zone_attributes = { :domain => domain_name }.merge!(config[:zone_attr...
github
fog/fog
https://github.com/fog/fog
tests/dns/models/records_tests.rb
Ruby
mit
4,298
master
724
for provider, config in dns_providers # FIXME: delay/timing breaks things :( next if [:dnsmadeeasy, :rage4].include?(provider) domain_name = uniq_id + '.com' Shindo.tests("Fog::DNS[:#{provider}] | records", [provider.to_s]) do record_attributes = { :name => 'www.' + domain_name, :type =>...
github
fog/fog
https://github.com/fog/fog
tests/dns/models/zone_tests.rb
Ruby
mit
4,298
master
423
for provider, config in dns_providers # FIXME: delay/timing breaks things :( next if [:dnsmadeeasy, :rage4].include?(provider) domain_name = uniq_id + '.com' Shindo.tests("Fog::DNS[:#{provider}] | zone", [provider.to_s]) do zone_attributes = { :domain => domain_name }.merge!(config[:zone_attri...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/ensure_list_tests.rb
Ruby
mit
4,298
master
2,605
Shindo.tests('Compute::VcloudDirector | ensure_list!', ['vclouddirector']) do # ensure list is not available in mocking mode unless Fog.mocking? @service = Fog::Compute::VcloudDirector.new tests('#ensure_list! for single key ensures our key has an array as a value') do tests('for key with a hash')....
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/vms_tests.rb
Ruby
mit
4,298
master
5,243
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vms", ['vclouddirector', 'all']) do pending if Fog.mocking? vapp = vapps.find {|v| v.vms.size >= 1} # we can't run these tests if there is no vapps with a vm in them pending unless vapp vms = vapp....
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/helper.rb
Ruby
mit
4,298
master
1,046
require 'fog/vcloud_director/compute' def boolean?(item) [TrueClass, FalseClass].include?(item.class) end def vcloud_director @vcloud_director ||= Fog::Compute::VcloudDirector.new( :connection_options => { :ssl_verify_peer => false, :connect_timeout => 200, :read_timeout => 200 } ) end...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/media_tests.rb
Ruby
mit
4,298
master
2,280
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests('Compute::VcloudDirector | media', ['vclouddirector']) do pending if Fog.mocking? medias = vdc.medias media_name = VcloudDirector::Compute::Helper.test_name tests('Compute::VcloudDirector | media', ['create']) do tests('#c...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb
Ruby
mit
4,298
master
4,186
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) VAPP_NAME = "shindo07" NETWORK_NAME = "DevOps - Dev Network Connection" NETWORK_MODE = "POOL" CATALOG_NAME = "Public VM Templates" CATALOG_ITEM_NAME = "DEVWEB" TAGS = { :company => "acme", :environment => "testing" } Shindo.tests("Compute::VcloudDi...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/catalog_items_tests.rb
Ruby
mit
4,298
master
1,983
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | catalog_items", ['vclouddirector', 'all']) do pending if Fog.mocking? pending if catalog.nil? catalog_items = catalog.catalog_items pending if catalog_items.empty? tests("#There is one or more catal...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/vapp_template_tests.rb
Ruby
mit
4,298
master
982
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vapp_templates", ['vclouddirector', 'all']) do # unless there is atleast one vapp we cannot run these tests pending if vdc.vapp_templates.empty? vapp_templates = vdc.vapp_templates vapp = vapp_templa...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/vdcs_tests.rb
Ruby
mit
4,298
master
2,181
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vdcs", ['vclouddirector', 'all']) do tests("#There is one or more vdc").returns(true){ organization.vdcs.size >= 1 } vdcs = organization.vdcs vdc = vdcs.first tests("Compute::VcloudDirector | vdc") d...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/vapp_tests.rb
Ruby
mit
4,298
master
2,518
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vapps", ['vclouddirector', 'all']) do # unless there is atleast one vapp we cannot run these tests pending if vdc.vapps.empty? vapps = vdc.vapps vapp = vapps.first tests("Compute::VcloudDirector |...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/catalogs_tests.rb
Ruby
mit
4,298
master
1,740
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | catalogs", ['vclouddirector', 'all']) do pending if Fog.mocking? pending if organization.catalogs.empty? catalogs = organization.catalogs tests("#There is one or more catalog").returns(true) { catalog...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/network_tests.rb
Ruby
mit
4,298
master
4,751
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | networks", ['vclouddirector', 'all']) do # unless there is at least one network we cannot run these tests pending if organization.networks.empty? service = Fog::Compute::VcloudDirector.new networks ...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/organizations_tests.rb
Ruby
mit
4,298
master
779
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | organizations", ['vclouddirector', 'all']) do organizations = vcloud_director.organizations tests("#There is at least one organization").returns(true) { organizations.size >= 1 } org = organizations.get...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/models/compute/tasks_tests.rb
Ruby
mit
4,298
master
2,040
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests('Compute::VcloudDirector | tasks', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new() if Fog.mocking? # add a bunch of tasks 50.times do task_id = @service.enqueue_task( "Bogus Task", ...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/task_tests.rb
Ruby
mit
4,298
master
1,387
Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('error conditions') do tests('retrieve non-existent TasksList').raises(Fog::Compute::VcloudDirector::Forbidden) do @service.get_task_list('00000000-0000-0000-0000-000000000000...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/organization_tests.rb
Ruby
mit
4,298
master
1,460
Shindo.tests('Compute::VcloudDirector | organization requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_organizations').data_matches_schema(VcloudDirector::Compute::Schema::ORG_LIST_TYPE) do @org_list = @service.get_organizations.body end tests('#get_organization')....
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb
Ruby
mit
4,298
master
1,363
Shindo.tests('Compute::VcloudDirector | ovf requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('Get first vDC') do session = @service.get_current_session.body link = @org[:Link].find do |l| l[:type] == 'a...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/schema_helper.rb
Ruby
mit
4,298
master
21,798
class VcloudDirector module Compute module Schema # Mapping of a content media type to a xsd complex type. MEDIA_TYPE_MAPPING_TYPE = { :MediaType => String, :ComplexTypeName => String, :SchemaLocation => String } # Information for one version of the API. VERS...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/query_tests.rb
Ruby
mit
4,298
master
4,237
Shindo.tests('Compute::VcloudDirector | query requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('retrieve a summary list of all typed queries types') do tests('#get_execute_query') do @query_list = @service.get_execute_query.body tests(':type').returns('applicatio...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/media_tests.rb
Ruby
mit
4,298
master
8,827
Shindo.tests('Compute::VcloudDirector | media requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('error conditions') do tests('#post_upload_media') do tests('Invalid image_type').raises(Fog::Compute::VcloudDirector::BadRequest) do @service.post_upload_media('0000...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/groups_tests.rb
Ruby
mit
4,298
master
648
Shindo.tests('Compute::VcloudDirector | groups requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_groups_from_query') do pending if Fog.mocking? %w[idrecords records references].each do |format| tests(":format => #{format}") do tests('#body').data_match...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb
Ruby
mit
4,298
master
1,132
Shindo.tests('Compute::VcloudDirector | vdc_storage_profile requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) @vdc_id = VcloudDirector::Compute::Helper.first_vdc_id(@org) @vdc = @service.get_vdc(@vdc_id).body @vdc[:VdcS...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/disk_tests.rb
Ruby
mit
4,298
master
8,029
Shindo.tests('Compute::VcloudDirector | disk requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @disk_name = VcloudDirector::Compute::Helper.test_name tests('error conditions') do tests('#post_upload_disk') do tests('Invalid size').raises(Fog::Compute::VcloudDirector::BadReq...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/vdc_tests.rb
Ruby
mit
4,298
master
1,333
Shindo.tests('Compute::VcloudDirector | vdc requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('#get_vdc').data_matches_schema(VcloudDirector::Compute::Schema::VDC_TYPE) do link = @org[:Link].find do |l| l[:r...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/network_tests.rb
Ruby
mit
4,298
master
6,434
require 'pp' Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) do GET_NETWORK_FORMAT = { :type => String, :name => String, :href => String, :id => String, :description => Fog::Nullable::String, :is_inherited => Fog::Boolean, :gateway => Fog::Nullable::String,...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/vm_tests.rb
Ruby
mit
4,298
master
8,029
Shindo.tests('Compute::VcloudDirector | vm requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('Each vDC') do @org[:Link].select do |l| l[:type] == 'application/vnd.vmware.vcloud.vdc+xml' end.each do |link...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/vapp_tests.rb
Ruby
mit
4,298
master
5,042
Shindo.tests('Compute::VcloudDirector | vapp requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('Each vDC') do @org[:Link].select do |l| l[:type] == 'application/vnd.vmware.vcloud.vdc+xml' end.each do |li...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/edge_gateway_tests.rb
Ruby
mit
4,298
master
8,615
Shindo.tests('Compute::VcloudDirector | edge gateway requests', ['vclouddirector']) do FIREWALL_RULE_ID = '9999' @dhcp_configuration = { :GatewayDhcpService => { :IsEnabled => "true", :pools => [{ :IsEnabled => "true", :Network => "testNet", :DefaultLeaseTime => "65", ...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/supported_systems_tests.rb
Ruby
mit
4,298
master
368
Shindo.tests('Compute::VcloudDirector | supported_systems requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new if @service.api_version.to_f >= 5.1 tests('#get_supported_systems_info').formats(VcloudDirector::Compute::Schema::SUPPORTED_OPERATING_SYSTEMS_INFO_TYPE) do @service.get...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/versions_tests.rb
Ruby
mit
4,298
master
417
Shindo.tests('Compute::VcloudDirector | versions requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_supported_versions').formats(VcloudDirector::Compute::Schema::SUPPORTED_VERSIONS_TYPE) do @versions = @service.get_supported_versions.body end tests('API 5.1 is suppo...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/catalog_tests.rb
Ruby
mit
4,298
master
1,689
Shindo.tests('Compute::VcloudDirector | catalog requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('#get_catalog').data_matches_schema(VcloudDirector::Compute::Schema::CATALOG_TYPE) do link = @org[:Link].find do |l...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/users_tests.rb
Ruby
mit
4,298
master
643
Shindo.tests('Compute::VcloudDirector | users requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_users_from_query') do pending if Fog.mocking? %w[idrecords records references].each do |format| tests(":format => #{format}") do tests('#body').data_matches...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/helper.rb
Ruby
mit
4,298
master
838
class VcloudDirector module Compute module Helper def self.test_name @test_name ||= 'fog-test-%x' % Time.now.to_i end def self.fixture(filename) File.join(File.expand_path('../../../fixtures', __FILE__), filename) end def self.current_org(service) service.ge...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/session_tests.rb
Ruby
mit
4,298
master
454
Shindo.tests('Compute::VcloudDirector | session requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#post_login_sessions').data_matches_schema(VcloudDirector::Compute::Schema::SESSION_TYPE) do pending @service.login.body # calls post_login_sessions end tests('#get_cur...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/requests/compute/admin_tests.rb
Ruby
mit
4,298
master
476
Shindo.tests('Compute::VcloudDirector | admin requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_vcloud').data_matches_schema(VcloudDirector::Compute::Schema::VCLOUD_TYPE) do @service.get_vcloud.body end @org = VcloudDirector::Compute::Helper.current_org(@service) ...
github
fog/fog
https://github.com/fog/fog
tests/vcloud_director/generators/compute/compose_vapp_tests.rb
Ruby
mit
4,298
master
5,506
require 'fog/vcloud_director/generators/compute/compose_vapp' Shindo.tests("Compute::VcloudDirector - ComposeVapp", ['vclouddirector']) do @vapp_configuration = { :Description => 'a description', :InstantiationParams => { :DefaultStorageProfile => 'profile', :NetworkConfig => [ { ...
github
fog/fog
https://github.com/fog/fog
tests/openvz/helper.rb
Ruby
mit
4,298
master
1,126
# Shortcut for Fog::Compute[:openvz] def openvz_service Fog::Compute[:openvz] end # Create a long lived server for the tests def openvz_fog_test_server server = openvz_service.servers.find { |s| s.ctid == '104' } unless server server = openvz_service.servers.create :ctid => '104' server.start se...
github
fog/fog
https://github.com/fog/fog
tests/openvz/models/compute/server_tests.rb
Ruby
mit
4,298
master
1,193
Shindo.tests("Fog::Compute[:openvz] | server model", ['openvz', 'compute']) do server = openvz_fog_test_server tests('The server model should') do tests('have the action') do test('reload') { server.respond_to? 'reload' } %w{ destroy mount umount restart s...
github
fog/fog
https://github.com/fog/fog
tests/openvz/models/compute/servers_tests.rb
Ruby
mit
4,298
master
870
Shindo.tests('Fog::Compute[:openvz] | servers collection', ['openvz']) do openvz_service = Fog::Compute[:openvz] tests('The servers collection') do servers = openvz_service.servers.all server = openvz_fog_test_server test('should NOT be empty') do servers.reload !servers.empty? end ...
github
fog/fog
https://github.com/fog/fog
tests/glesys/requests/compute/template_tests.rb
Ruby
mit
4,298
master
290
Shindo.tests('Fog::Compute[:glesys] | template requests', ['glesys']) do tests('success') do tests("#template_list()").formats(Glesys::Compute::Formats::Templates::LIST) do pending if Fog.mocking? Fog::Compute[:glesys].template_list.body['response'] end end end
github
fog/fog
https://github.com/fog/fog
tests/glesys/requests/compute/ip_tests.rb
Ruby
mit
4,298
master
1,845
Shindo.tests('Fog::Compute[:glesys] | ip requests', ['glesys']) do @free_ip = nil @ips = nil tests('success') do tests("#ip_list_own()").formats(Glesys::Compute::Formats::Ips::IPLIST) do pending if Fog.mocking? Fog::Compute[:glesys].ip_list_own.body['response'] end tests("#ip_list_free...
github
fog/fog
https://github.com/fog/fog
tests/glesys/requests/compute/helper.rb
Ruby
mit
4,298
master
9,297
class Glesys module Compute module Formats module Servers LIST = { 'debug' => { 'input' => Array }, 'servers' => [{ 'serverid' => String, 'hostname' => String, 'datacenter' => String, 'platform' => String ...
github
fog/fog
https://github.com/fog/fog
tests/glesys/requests/compute/ssh_key_tests.rb
Ruby
mit
4,298
master
1,908
Shindo.tests("Fog::Compute[:glesys] | ssh_key requests", ["glesys", "compute"]) do @testdescription = "My test key to be removed" @testdata = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDv+r/dCIDv+YazWsyc1WCixR+iOeaswTx1U45h6vh4/ fog-unittest@GleSYS" @testdata_malformed = "ssh-rot13 AAAAthis_is_not_an_ssh_key fog-unitt...
github
fog/fog
https://github.com/fog/fog
tests/glesys/requests/compute/server_tests.rb
Ruby
mit
4,298
master
5,009
Shindo.tests('Fog::Compute[:glesys] | server requests', ['glesys']) do @serverid = nil @hostname = "fog-#{Time.now.to_i}" @create = ":hostname => #@hostname, :rootpassword => 'pw#{Time.now.to_i}', "+ ":datacenter => 'Falkenberg', :platform => 'VMware', :templatename => 'Debian 7.0 64-bit', "+ ":di...
github
fog/fog
https://github.com/fog/fog
tests/compute/helper.rb
Ruby
mit
4,298
master
2,667
def compute_providers { :aws => { :server_attributes => {}, :mocked => true }, :cloudstack => { :provider_attributes => { :cloudstack_host => 'http://host.foo' }, :server_attributes => {}.tap do |hash| [:zone_id, :network_ids, :template_id, :service_off...