From bded73bfb3806a843bd2bb6a9daa9704c1fcc8a4 Mon Sep 17 00:00:00 2001 From: Nat Welch Date: Tue, 16 Apr 2013 20:42:54 -0700 Subject: [PATCH] More accurate disk tests that fail --- tests/google/requests/compute/disk_tests.rb | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/google/requests/compute/disk_tests.rb b/tests/google/requests/compute/disk_tests.rb index 293a49059..4080435ea 100644 --- a/tests/google/requests/compute/disk_tests.rb +++ b/tests/google/requests/compute/disk_tests.rb @@ -11,6 +11,7 @@ Shindo.tests('Fog::Compute[:google] | disk requests', ['google']) do 'status' => String, 'user' => String, 'progress' => Integer, + 'zone' => String, 'insertTime' => String, 'startTime' => String, 'operationType' => String @@ -38,6 +39,7 @@ Shindo.tests('Fog::Compute[:google] | disk requests', ['google']) do 'user' => String, 'progress' => Integer, 'insertTime' => String, + 'zone' => String, 'startTime' => String, 'operationType' => String } @@ -46,28 +48,38 @@ Shindo.tests('Fog::Compute[:google] | disk requests', ['google']) do 'kind' => String, 'id' => String, 'selfLink' => String, - 'items' => [] + 'items' => [{ + 'kind'=> String, + 'id'=> String, + 'creationTimestamp'=>String, + 'selfLink'=>String, + 'name'=> String, + 'sizeGb'=> String, + 'zone'=> String, + 'status'=>String, + }] } tests('success') do disk_name = 'new-disk-test' disk_size = '2' + zone_name = 'us-central1-a' tests("#insert_disk").formats(@insert_disk_format) do - @google.insert_disk(disk_name, disk_size).body + @google.insert_disk(disk_name, disk_size, zone_name).body end tests("#get_disk").formats(@get_disk_format) do - @google.get_disk(disk_name).body + @google.get_disk(disk_name, zone_name).body end tests("#list_disks").formats(@list_disks_format) do - @google.list_disks.body + @google.list_disks(zone_name).body end tests("#delete_disk").formats(@delete_disk_format) do - @google.delete_disk(disk_name).body + @google.delete_disk(disk_name, zone_name).body end end