diff --git a/tests/credentials_tests.rb b/tests/credentials_tests.rb deleted file mode 100644 index 7dbf7a4654..0000000000 --- a/tests/credentials_tests.rb +++ /dev/null @@ -1,75 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in `spec/fog/google_spec.rb` - -require 'google/api_client' - -Shindo.tests('Google | credentials', ['google']) do - - tests('success') do - pending if Fog.mocking? - - google_key_location = Fog.credentials[:google_key_location] - if google_key_location.nil? - tests('Needs a :google_key_location credentials key').pending - end - google_key_string = File.open(File.expand_path(google_key_location), 'rb') { |io| io.read } - - tests("#using_p12_key_file").succeeds do - Fog::Compute::Google.new(:google_key_location => google_key_location, - :google_key_string => nil, - :google_json_key_location => nil, - :google_json_key_string => nil) - end - - tests("#using_p12_key_string").succeeds do - Fog::Compute::Google.new(:google_key_location => nil, - :google_key_string => google_key_string, - :google_json_key_location => nil, - :google_json_key_string => nil) - end - end - - tests('success') do - pending if Fog.mocking? - - google_json_key_location = Fog.credentials[:google_json_key_location] - if google_json_key_location.nil? - tests('Needs a :google_json_key_location credentials key').pending - end - google_json_key_string = File.open(File.expand_path(google_json_key_location), 'rb') { |io| io.read } - - tests("#using_json_key_file").succeeds do - Fog::Compute::Google.new(:google_key_location => nil, - :google_key_string => nil, - :google_json_key_location => google_json_key_location, - :google_json_key_string => nil) - end - - tests("#using_json_key_string").succeeds do - Fog::Compute::Google.new(:google_key_location => nil, - :google_key_string => nil, - :google_json_key_location => nil, - :google_json_key_string => google_json_key_string) - end - end - - tests('failure') do - tests("#missing_google_project").raises(ArgumentError, 'raises ArgumentError when google_project is missing') do - Fog::Compute::Google.new(:google_project => nil) - end - - tests("#missing_google_client_email").raises(ArgumentError, 'raises ArgumentError when google_client_email is missing') do - pending if Fog.mocking? # Mock doesn't check google_client_email - Fog::Compute::Google.new(:google_client_email => nil, - :google_json_key_location => nil) # JSON key overrides google_client_email - end - - tests("#missing_keys").raises(ArgumentError, 'raises ArgumentError when google keys are missing') do - pending if Fog.mocking? # Mock doesn't check missing keys - Fog::Compute::Google.new(:google_key_location => nil, - :google_key_string => nil, - :google_json_key_location => nil, - :google_json_key_string => nil) - end - end - -end diff --git a/tests/models/compute/backend_service_tests.rb b/tests/models/compute/backend_service_tests.rb deleted file mode 100644 index 97824a4d6c..0000000000 --- a/tests/models/compute/backend_service_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | backend service model", ['google']) do - random_string = SecureRandom.hex - @health_check = create_test_http_health_check(Fog::Compute[:google]) - model_tests(Fog::Compute[:google].backend_services, {:name => "fog-test-backend-service-#{random_string}", - :health_checks => [@health_check.self_link]}) -end diff --git a/tests/models/compute/backend_services_tests.rb b/tests/models/compute/backend_services_tests.rb deleted file mode 100644 index ce91ec422d..0000000000 --- a/tests/models/compute/backend_services_tests.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | backend_services model", ['google']) do - random_string = SecureRandom.hex - @health_check = create_test_http_health_check(Fog::Compute[:google]) - collection_tests(Fog::Compute[:google].backend_services, {:name => "fog-backend-services-test-#{random_string}", - :health_checks => [@health_check.self_link]}) - -end diff --git a/tests/models/compute/disk_tests.rb b/tests/models/compute/disk_tests.rb deleted file mode 100644 index c55cd4a5c3..0000000000 --- a/tests/models/compute/disk_tests.rb +++ /dev/null @@ -1,11 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -Shindo.tests("Fog::Compute[:google] | disk model", ['google']) do - - model_tests(Fog::Compute[:google].disks, {:name => 'fog-disk-model-tests', - :zone => 'us-central1-a', - :size_gb => 10}) do |model| - model.wait_for { ready? } - end - -end diff --git a/tests/models/compute/disk_types_tests.rb b/tests/models/compute/disk_types_tests.rb deleted file mode 100644 index 495ca27bc0..0000000000 --- a/tests/models/compute/disk_types_tests.rb +++ /dev/null @@ -1,24 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -Shindo.tests("Fog::Compute[:google] | disk_types model", ['google']) do - @disk_types = Fog::Compute[:google].disk_types - - tests('success') do - - tests('#all').succeeds do - @disk_types.all - end - - tests('#get').succeeds do - disk_type = @disk_types.all.first - @disk_types.get(disk_type.name) - end - - tests('failure') do - tests('#get').returns(nil) do - @disk_types.get(Fog::Mock.random_letters_and_numbers(16)) - end - end - - end -end diff --git a/tests/models/compute/disks_tests.rb b/tests/models/compute/disks_tests.rb deleted file mode 100644 index 26403648af..0000000000 --- a/tests/models/compute/disks_tests.rb +++ /dev/null @@ -1,11 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -Shindo.tests("Fog::Compute[:google] | disks", ['google']) do - - collection_tests(Fog::Compute[:google].disks, {:name => 'fog-disks-collections-tests', - :zone => 'us-central1-a', - :size_gb => 10}) do |instance| - instance.wait_for { ready? } - end - -end diff --git a/tests/models/compute/forwarding_rule_tests.rb b/tests/models/compute/forwarding_rule_tests.rb deleted file mode 100644 index 9504b753d7..0000000000 --- a/tests/models/compute/forwarding_rule_tests.rb +++ /dev/null @@ -1,10 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | forwarding rule model", ['google']) do - random_string = SecureRandom.hex - region = 'us-central1' - target_pool = create_test_target_pool(Fog::Compute[:google], region) - model_tests(Fog::Compute[:google].forwarding_rules, {:name => "fog-test-forwarding-rules-#{random_string}", :region => region, :target => target_pool.self_link}) - -end diff --git a/tests/models/compute/forwarding_rules_tests.rb b/tests/models/compute/forwarding_rules_tests.rb deleted file mode 100644 index 8eb2ad682c..0000000000 --- a/tests/models/compute/forwarding_rules_tests.rb +++ /dev/null @@ -1,10 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | forwarding rules model", ['google']) do - random_string = SecureRandom.hex - region = 'us-central1' - target_pool = create_test_target_pool(Fog::Compute[:google], region) - collection_tests(Fog::Compute[:google].forwarding_rules, {:name => "fog-test-forwarding-rule-#{random_string}", :region => region, :target => target_pool.self_link}) - -end diff --git a/tests/models/compute/global_forwarding_rule_tests.rb b/tests/models/compute/global_forwarding_rule_tests.rb deleted file mode 100644 index 9dc986ff64..0000000000 --- a/tests/models/compute/global_forwarding_rule_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | global forwarding rule model", ['google']) do - random_string = SecureRandom.hex - proxy = create_test_target_http_proxy(Fog::Compute[:google]) - model_tests(Fog::Compute[:google].global_forwarding_rules, {:name => "fog-test-global-forwarding-rule-#{random_string}", :target => proxy.self_link}) - -end diff --git a/tests/models/compute/global_forwarding_rules_tests.rb b/tests/models/compute/global_forwarding_rules_tests.rb deleted file mode 100644 index 9b8fdeb682..0000000000 --- a/tests/models/compute/global_forwarding_rules_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | global forwarding rules model", ['google']) do - random_string = SecureRandom.hex - proxy = create_test_target_http_proxy(Fog::Compute[:google]) - collection_tests(Fog::Compute[:google].global_forwarding_rules, {:name => "fog-test-global-forwarding-rule-#{random_string}", :target => proxy.self_link}) - -end diff --git a/tests/models/compute/http_health_check_tests.rb b/tests/models/compute/http_health_check_tests.rb deleted file mode 100644 index 21a5dbaaf4..0000000000 --- a/tests/models/compute/http_health_check_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | HTTP health check model", ['google']) do - random_string = SecureRandom.hex - model_tests(Fog::Compute[:google].http_health_checks, {:name => "fog-test-http-health-check-#{random_string}"}) -end diff --git a/tests/models/compute/http_health_checks_tests.rb b/tests/models/compute/http_health_checks_tests.rb deleted file mode 100644 index 46e7369637..0000000000 --- a/tests/models/compute/http_health_checks_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | HTTP health checks model", ['google']) do - random_string = SecureRandom.hex - collection_tests(Fog::Compute[:google].http_health_checks, {:name => "fog-test-http-health-check-#{random_string}"}) -end diff --git a/tests/models/compute/image_tests.rb b/tests/models/compute/image_tests.rb deleted file mode 100644 index 13241aea3a..0000000000 --- a/tests/models/compute/image_tests.rb +++ /dev/null @@ -1,8 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | image model", ['google']) do - random_string = SecureRandom.hex - source = 'http://storage.googleapis.com/fog-test-bucket/fog-test-raw-disk-source.image.tar.gz' - model_tests(Fog::Compute[:google].images, {:name => "fog-test-images-#{random_string}", "rawDisk" => { "source" => source } }) -end diff --git a/tests/models/compute/images_tests.rb b/tests/models/compute/images_tests.rb deleted file mode 100644 index e37cd4de5c..0000000000 --- a/tests/models/compute/images_tests.rb +++ /dev/null @@ -1,8 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | images model", ['google']) do - random_string = SecureRandom.hex - source = 'http://storage.googleapis.com/fog-test-bucket/fog-test-raw-disk-source.image.tar.gz' - collection_tests(Fog::Compute[:google].images, {:name => "fog-test-images-#{random_string}", "rawDisk" => { "source" => source } }) -end diff --git a/tests/models/compute/region_tests.rb b/tests/models/compute/region_tests.rb deleted file mode 100644 index 7906fdaec5..0000000000 --- a/tests/models/compute/region_tests.rb +++ /dev/null @@ -1,12 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -Shindo.tests("Fog::Compute[:google] | region model", ['google']) do - @regions = Fog::Compute[:google].regions - - tests('success') do - tests('#up').succeeds do - region = @regions.get @regions.all.first.name - region.up? - end - end -end diff --git a/tests/models/compute/regions_tests.rb b/tests/models/compute/regions_tests.rb deleted file mode 100644 index 45632c9841..0000000000 --- a/tests/models/compute/regions_tests.rb +++ /dev/null @@ -1,21 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -Shindo.tests("Fog::Compute[:google] | regions model", ['google']) do - @regions = Fog::Compute[:google].regions - - tests('success') do - tests('#all').succeeds do - @regions.all - end - - tests('#get').succeeds do - @regions.get @regions.all.first.name - end - end - - tests('failure') do - tests('#get').returns(nil) do - @regions.get 'unicorn' - end - end -end diff --git a/tests/models/compute/server_tests.rb b/tests/models/compute/server_tests.rb deleted file mode 100644 index 367df8ac88..0000000000 --- a/tests/models/compute/server_tests.rb +++ /dev/null @@ -1,39 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' - -Shindo.tests("Fog::Compute[:google] | server model", ['google']) do - - @zone = 'us-central1-a' - @disk = create_test_disk(Fog::Compute[:google], @zone) - random_string = SecureRandom.hex - - model_tests(Fog::Compute[:google].servers, {:name => "fog-test-server-#{random_string}", - :zone_name => @zone, - :machine_type => 'n1-standard-1', - :disks => [@disk]}) - - tests('servers') do - @instance = nil - test('#bootstrap') do - attributes = Fog.mocking? ? {:public_key_path => nil, :private_key_path => nil} : {} - @instance = Fog::Compute[:google].servers.bootstrap(attributes) - @instance.ready? - end - - test('#sshable?') do - @instance.wait_for { sshable? } - @instance.sshable? - end - - test('#ssh') do - pending if Fog.mocking? - !!(@instance.ssh("uname").first.stdout =~ /Linux/) - end - - test('#destroy') do - response = @instance.destroy - response.operation_type == 'delete' - end - end -end diff --git a/tests/models/compute/servers_tests.rb b/tests/models/compute/servers_tests.rb deleted file mode 100644 index 727d776dba..0000000000 --- a/tests/models/compute/servers_tests.rb +++ /dev/null @@ -1,16 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' - -Shindo.tests("Fog::Compute[:google] | servers", ['google']) do - - @zone = 'us-central1-a' - @disk = create_test_disk(Fog::Compute[:google], @zone) - random_string = SecureRandom.hex - - collection_tests(Fog::Compute[:google].servers, {:name => "fog-test-server-#{random_string}", - :zone_name => @zone, - :machine_type => 'n1-standard-1', - :disks => [@disk]}) - -end diff --git a/tests/models/compute/target_http_proxies_tests.rb b/tests/models/compute/target_http_proxies_tests.rb deleted file mode 100644 index bb9ebf1cee..0000000000 --- a/tests/models/compute/target_http_proxies_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | target HTTP proxies model", ['google']) do - url_map = create_test_url_map(Fog::Compute[:google]) - random_string = SecureRandom.hex - collection_tests(Fog::Compute[:google].target_http_proxies, {:name => "fog-target-http-proxies-test-#{random_string}", :urlMap => url_map.self_link}) - -end diff --git a/tests/models/compute/target_http_proxy_test.rb b/tests/models/compute/target_http_proxy_test.rb deleted file mode 100644 index c042307be9..0000000000 --- a/tests/models/compute/target_http_proxy_test.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | target HTTP proxy model", ['google']) do - random_string = SecureRandom.hex - url_map = create_test_url_map(Fog::Compute[:google]) - model_tests(Fog::Compute[:google].target_http_proxies, {:name => "fog-test-target-http-proxy-#{random_string}", :urlMap => url_map.self_link}) -end diff --git a/tests/models/compute/target_instance_tests.rb b/tests/models/compute/target_instance_tests.rb deleted file mode 100644 index 7c6a134793..0000000000 --- a/tests/models/compute/target_instance_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | target instance model", ['google']) do - random_string = SecureRandom.hex - @zone = 'us-central1-a' - instance = create_test_server(Fog::Compute[:google], @zone) - model_tests(Fog::Compute[:google].target_instances, {:name => "fog-test-target-instance-#{random_string}", :instance => instance.self_link, :zone => @zone}) -end diff --git a/tests/models/compute/target_instances_tests.rb b/tests/models/compute/target_instances_tests.rb deleted file mode 100644 index d9a7f3cbe4..0000000000 --- a/tests/models/compute/target_instances_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | target instances model", ['google']) do - @zone= 'us-central1-a' - random_string = SecureRandom.hex - instance = create_test_server(Fog::Compute[:google], @zone) - collection_tests(Fog::Compute[:google].target_instances, {:name => "fog-test-target-instances-#{random_string}", :instance => instance.self_link, :zone => @zone}) -end diff --git a/tests/models/compute/target_pool_tests.rb b/tests/models/compute/target_pool_tests.rb deleted file mode 100644 index 96622f31b1..0000000000 --- a/tests/models/compute/target_pool_tests.rb +++ /dev/null @@ -1,14 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | target pool model", ['google']) do - - pending - - random_string = SecureRandom.hex - region = 'us-central1' - instance = create_test_server(Fog::Compute[:google], 'us-central1-a') - health_check = create_test_http_health_check(Fog::Compute[:google]) - model_tests(Fog::Compute[:google].target_pools, {:name => "fog-test-target-pool-#{random_string}", :region => region, :instances => [instance.self_link], :healthChecks => [health_check.self_link]}) - -end diff --git a/tests/models/compute/target_pools_tests.rb b/tests/models/compute/target_pools_tests.rb deleted file mode 100644 index f2f640f633..0000000000 --- a/tests/models/compute/target_pools_tests.rb +++ /dev/null @@ -1,13 +0,0 @@ -# TODO REMOVE this testing functionality is now covered in test/integration/compute - -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | target pools model", ['google']) do - random_string = SecureRandom.hex - region = 'us-central1' - instance = create_test_server(Fog::Compute[:google], 'us-central1-a') - health_check = create_test_http_health_check(Fog::Compute[:google]) - collection_tests( - Fog::Compute[:google].target_pools, - {:name => "fog-test-target-pool-#{random_string}", :region => region, :instances => [instance.self_link], :healthChecks => [health_check.self_link]} - ) -end diff --git a/tests/models/compute/url_map_tests.rb b/tests/models/compute/url_map_tests.rb deleted file mode 100644 index 8c7ecd0f13..0000000000 --- a/tests/models/compute/url_map_tests.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | url map model", ['google']) do - random_string = SecureRandom.hex - backend_service = create_test_backend_service(Fog::Compute[:google]) - model_tests(Fog::Compute[:google].url_maps, {:name => "fog-test-url-map-#{random_string}", :defaultService => backend_service.self_link}) -end diff --git a/tests/models/compute/url_maps_tests.rb b/tests/models/compute/url_maps_tests.rb deleted file mode 100644 index 2d5aa032ed..0000000000 --- a/tests/models/compute/url_maps_tests.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'securerandom' -Shindo.tests("Fog::Compute[:google] | url maps model", ['google']) do - backend_service = create_test_backend_service(Fog::Compute[:google]) - random_string = SecureRandom.hex - collection_tests(Fog::Compute[:google].url_maps, {:name => "fog-url-maps-test-#{random_string}", :defaultService => backend_service.self_link}) - -end