tests/requests/compute/backend_service_tests.rb in fog-google-0.1.3 vs tests/requests/compute/backend_service_tests.rb in fog-google-0.2.0
- old
+ new
@@ -1,68 +1,66 @@
-Shindo.tests('Fog::Compute[:google] | backend services requests', ['google']) do
-
+Shindo.tests("Fog::Compute[:google] | backend services requests", ["google"]) do
@google = Fog::Compute[:google]
@insert_backend_service_format = {
- 'kind' => String,
- 'id' => String,
- 'selfLink' => String,
- 'name' => String,
- 'targetLink' => String,
- 'status' => String,
- 'user' => String,
- 'progress' => Integer,
- 'zone' => String,
- 'insertTime' => String,
- 'startTime' => String,
- 'operationType' => String
+ "kind" => String,
+ "id" => String,
+ "selfLink" => String,
+ "name" => String,
+ "targetLink" => String,
+ "status" => String,
+ "user" => String,
+ "progress" => Integer,
+ "zone" => String,
+ "insertTime" => String,
+ "startTime" => String,
+ "operationType" => String
}
@get_backend_service_format = {
- 'kind' => String,
- 'id' => String,
- 'selfLink' => String,
- 'creationTimestamp' => String,
- 'name' => String,
- 'backends' => Array,
- 'healthChecks' => Array,
- 'port' => Integer,
- 'protocol' => String,
+ "kind" => String,
+ "id" => String,
+ "selfLink" => String,
+ "creationTimestamp" => String,
+ "name" => String,
+ "backends" => Array,
+ "healthChecks" => Array,
+ "port" => Integer,
+ "protocol" => String
}
@delete_backend_service_format = {
- 'kind' => String,
- 'id' => String,
- 'selfLink' => String,
- 'name' => String,
- 'targetLink' => String,
- 'targetId' => String,
- 'status' => String,
- 'user' => String,
- 'progress' => Integer,
- 'insertTime' => String,
- 'zone' => String,
- 'startTime' => String,
- 'operationType' => String
+ "kind" => String,
+ "id" => String,
+ "selfLink" => String,
+ "name" => String,
+ "targetLink" => String,
+ "targetId" => String,
+ "status" => String,
+ "user" => String,
+ "progress" => Integer,
+ "insertTime" => String,
+ "zone" => String,
+ "startTime" => String,
+ "operationType" => String
}
@list_backend_services_format = {
- 'kind' => String,
- 'selfLink' => String,
- 'id' => String,
- 'items' => Array
+ "kind" => String,
+ "selfLink" => String,
+ "id" => String,
+ "items" => Array
}
- tests('success') do
+ tests("success") do
+ backend_service_name = "test-backend-service"
+ zone_name = "us-central1-a"
- backend_service_name = 'test-backend-service'
- zone_name = 'us-central1-a'
-
# These will all fail if errors happen on insert
tests("#insert_backend_service").formats(@insert_backend_service_format) do
health_check = create_test_http_health_check(Fog::Compute[:google])
- options = { 'health_check' => health_check }
+ options = { "health_check" => health_check }
response = @google.insert_backend_service(backend_service_name, options).body
wait_operation(@google, response)
response
end
@@ -75,9 +73,7 @@
end
tests("#delete_backend_service").formats(@delete_backend_service_format) do
@google.delete_backend_service(backend_service_name).body
end
-
end
-
end