diff --git a/tests/google/requests/compute/operation_tests.rb b/tests/google/requests/compute/operation_tests.rb index bd5992a51..82de9ab42 100644 --- a/tests/google/requests/compute/operation_tests.rb +++ b/tests/google/requests/compute/operation_tests.rb @@ -2,45 +2,18 @@ Shindo.tests('Fog::Compute[:google] | operation requests', ['google']) do @google = Fog::Compute[:google] - @list_global_operations_format = { - 'kind' => String, - 'id' => String, - 'items' => [{ - 'kind' => String, - 'id' => String, - 'name' => String, - 'operationType' => String, - 'targetLink' => String, - 'targetId' => String, - 'status' => String, - 'user' => String, - 'progress' => Integer, - 'insertTime' => String, - 'startTime' => String, - 'endTime' => String, - 'selfLink' => String, - }], - 'selfLink' => String, - } - - @list_zone_operations_format = { - 'kind' => String, - 'id' => String, - 'selfLink' => String, - #'items' => [] - } - tests('success') do - tests("#list_global_operations").formats(@list_global_operations_format) do - @google.list_global_operations.body + # We are not testing the format here because operation formats are pretty + # extensive based on what has happened to you account, ever. + # https://developers.google.com/compute/docs/reference/latest/globalOperations#resource + tests("#list_global_operations").succeeds do + @google.list_global_operations end - tests("#list_zone_operations").formats(@list_zone_operations_format) do + tests("#list_zone_operations").succeeds do zone_name = @google.list_zones.body["items"][0]["name"] - @google.list_zone_operations(zone_name).body + @google.list_zone_operations(zone_name) end - end - end