deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [8/9] GoGrid: Added initial MiniTest tests
Date Fri, 24 Aug 2012 09:49:46 GMT
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3563f0ea/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_instance.yml
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_instance.yml
b/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_instance.yml
new file mode 100644
index 0000000..b3a247e
--- /dev/null
+++ b/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_instance.yml
@@ -0,0 +1,458 @@
+---
+http_interactions:
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/grid/server/get?api_key=9bbf139b8b57d967&format=json&name=test&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web2-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=6B8AA4F8650838C68E0196447E02FB0A; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:13:50 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '2807'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":1,"start":0,"numpages":0,"returned":1},"status":"success","method":"/grid/server/get","list":[{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/support/password/list?api_key=9bbf139b8b57d967&format=json&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=9DBF0090611699BF713E7B1B63EB0084; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:13:52 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '3041'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":2,"start":0,"numpages":0,"returned":2},"status":"success","method":"/support/password/list","list":[{"id":399303,"username":"root","applicationtype":"os","server":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600},"object":"password","password":"HOLybUeOv3"},{"id":72398,"username":"26648","applicationtype":"US-West-1
+        Storage","object":"password","password":"3woc7UWdJsJEcm8@"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/grid/server/get?api_key=9bbf139b8b57d967&format=json&name=test&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web2-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=2642ED5669A6EA6C1D4DDF9A9115D2CF; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:13:53 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '2807'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":1,"start":0,"numpages":0,"returned":1},"status":"success","method":"/grid/server/get","list":[{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/support/password/list?api_key=9bbf139b8b57d967&format=json&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web2-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=1225989D8111D53A58AA41D3B8A8F7A3; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:13:54 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '3041'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":2,"start":0,"numpages":0,"returned":2},"status":"success","method":"/support/password/list","list":[{"id":399303,"username":"root","applicationtype":"os","server":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600},"object":"password","password":"HOLybUeOv3"},{"id":72398,"username":"26648","applicationtype":"US-West-1
+        Storage","object":"password","password":"3woc7UWdJsJEcm8@"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/grid/server/get?api_key=9bbf139b8b57d967&format=json&name=test&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=49ED1F09EF5246B518BDDC2F164003A2; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:13:56 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '2807'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":1,"start":0,"numpages":0,"returned":1},"status":"success","method":"/grid/server/get","list":[{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/support/password/list?api_key=9bbf139b8b57d967&format=json&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web3-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=F0653DBF8C5A3660C13DA28FC07D9743; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:13:59 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '3041'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":2,"start":0,"numpages":0,"returned":2},"status":"success","method":"/support/password/list","list":[{"id":399303,"username":"root","applicationtype":"os","server":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600},"object":"password","password":"HOLybUeOv3"},{"id":72398,"username":"26648","applicationtype":"US-West-1
+        Storage","object":"password","password":"3woc7UWdJsJEcm8@"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/grid/server/get?api_key=9bbf139b8b57d967&format=json&name=unknown&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 400
+      message: Bad Request
+    headers:
+      Connection:
+      - close
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=AC052E6530E167B552737CBA53317F90; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:14:00 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '222'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":1,"start":0,"returned":1},"status":"failure","method":"/grid/server/get","list":[{"message":"No
+        object found that matches your input criteria.","object":"error","errorcode":"IllegalArgumentException"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/grid/server/list?api_key=9bbf139b8b57d967&format=json&sig=65def4a564c4fabc70570d1bf8a8f07d&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=1372365AB3475A9780D53BD998F069BE; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 12:14:01 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '2808'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":1,"start":0,"numpages":0,"returned":1},"status":"success","method":"/grid/server/list","list":[{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"state":{"id":1,"description":"Server
+        is in active state.","name":"On","object":"option"},"image":{"os":{"id":73,"description":"CentOS
+        5.6 (32-bit)","name":"CentOS 5.6 (32-bit)","object":"option"},"datacenterlist":[{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000},{"state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"datacenter":{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"},"object":"image_datacenter_state","updatedTime":1294198799000}],"location":"gogrid/GSI-840b854e-4862-49d4-8c83-4768ae48fa3b.img","state":{"id":2,"description":"Image
+        is available for adds","name":"Available","object":"option"},"friendlyName":"CentOS
+        5.6 (32-bit) w/ None","object":"serverimage","architecture":{"id":1,"description":"32
+        bit OS","name":"32-bit","object":"option"},"isPublic":true,"billingtokens":[{"id":73,"price":0,"name":"CentOS
+        5.6 (32-bit)","object":"billingtoken"}],"type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"id":9928,"isActive":true,"gsitype":{"id":1,"description":"Image
+        produced and certified by GoGrid","name":"baseGSI","object":"option"},"price":0,"description":"CentOS
+        5.6 (32-bit) w/ None","name":"centos5.6_32_base","owner":{"id":-1,"name":"GoGrid","object":"customer"},"updatedTime":1294198799000,"minram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"}},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"server","type":{"id":1,"description":"Web
+        or Application Server","name":"Web Server","object":"option"},"cores":0.5,"ip":{"id":1656767,"subnet":"173.204.26.112/255.255.255.240","state":{"id":2,"description":"IP
+        is reserved or in use","name":"Assigned","object":"option"},"datacenter":{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},"object":"ip","public":true,"ip":"173.204.26.114"},"id":386143,"ram":{"id":1,"description":"Server
+        with 512MB RAM","name":"512MB","object":"option"},"description":"testdesc","name":"test","isSandbox":false,"diskSize":25600}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 12:12:00 GMT
+recorded_with: VCR 2.2.4

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3563f0ea/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_realm.yml
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_realm.yml
b/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_realm.yml
new file mode 100644
index 0000000..10f40bc
--- /dev/null
+++ b/server/tests/drivers/gogrid/fixtures/test_0004_must_allow_to_retrieve_single_realm.yml
@@ -0,0 +1,203 @@
+---
+http_interactions:
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/common/lookup/list?api_key=9bbf139b8b57d967&format=json&lookup=ip.datacenter&sig=87793253b9792183251c078d84eaef1c&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web2-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=23DD1FED0F598F27D30476D33692BEF6; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 11:32:08 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '367'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":3,"start":0,"numpages":0,"returned":3},"status":"success","method":"/common/lookup/list","list":[{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 11:30:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/common/lookup/list?api_key=9bbf139b8b57d967&format=json&lookup=ip.datacenter&sig=87793253b9792183251c078d84eaef1c&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=23E3120E9B613EC5AC5C70AB80C9DBF4; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 11:32:08 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '367'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":3,"start":0,"numpages":0,"returned":3},"status":"success","method":"/common/lookup/list","list":[{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 11:30:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/common/lookup/list?api_key=9bbf139b8b57d967&format=json&lookup=ip.datacenter&sig=87793253b9792183251c078d84eaef1c&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web2-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=C52B7658AC1F03FFC706D6B89C9AD6A5; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 11:32:09 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '367'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":3,"start":0,"numpages":0,"returned":3},"status":"success","method":"/common/lookup/list","list":[{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 11:30:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/common/lookup/list?api_key=9bbf139b8b57d967&format=json&lookup=ip.datacenter&sig=87793253b9792183251c078d84eaef1c&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=2611DF368C5E68955A4A28C593F4A81E; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 11:32:10 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '367'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":3,"start":0,"numpages":0,"returned":3},"status":"success","method":"/common/lookup/list","list":[{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 11:30:00 GMT
+- request:
+    method: get
+    uri: https://api.gogrid.com/api/common/lookup/list?api_key=9bbf139b8b57d967&format=json&lookup=ip.datacenter&sig=87793253b9792183251c078d84eaef1c&v=1.9
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Connection:
+      - close
+      X-Mashery-Responder:
+      - mashery-web1-lax.mashery.com
+      Server:
+      - Apache-Coyote/1.1
+      Set-Cookie:
+      - JSESSIONID=8D0C5BBDFF7C36682EA671046400DE83; Path=/api; Secure
+      Date:
+      - Thu, 23 Aug 2012 11:32:12 GMT
+      Accept-Ranges:
+      - bytes
+      Content-Length:
+      - '367'
+      Content-Type:
+      - text/html
+    body:
+      encoding: US-ASCII
+      string: ! '{"summary":{"total":3,"start":0,"numpages":0,"returned":3},"status":"success","method":"/common/lookup/list","list":[{"id":1,"description":"US
+        West 1 Datacenter","name":"US-West-1","object":"option"},{"id":2,"description":"US
+        East 1 Datacenter","name":"US-East-1","object":"option"},{"id":3,"description":"EU-West-1
+        Datacenter","name":"EU-West-1","object":"option"}]}'
+    http_version: 
+  recorded_at: Thu, 23 Aug 2012 11:30:00 GMT
+recorded_with: VCR 2.2.4

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3563f0ea/server/tests/drivers/gogrid/hardware_profiles_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/hardware_profiles_test.rb b/server/tests/drivers/gogrid/hardware_profiles_test.rb
new file mode 100644
index 0000000..def1232
--- /dev/null
+++ b/server/tests/drivers/gogrid/hardware_profiles_test.rb
@@ -0,0 +1,53 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'GoGrid Hardware Profiles' do
+
+  before do
+    Time.be(DateTime.parse("2012-08-23 11:58:00 +0000").to_s)
+    @driver = Deltacloud::new(:gogrid, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.realms(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of hardware profiles' do
+    @driver.hardware_profiles.wont_be_empty
+    @driver.hardware_profiles.first.must_be_kind_of Deltacloud::HardwareProfile
+  end
+
+  it 'must allow to filter hardware profiles' do
+    @driver.hardware_profiles(:id => 'web-server').wont_be_empty
+    @driver.hardware_profiles(:id => 'web-server').must_be_kind_of Array
+    @driver.hardware_profiles(:id => 'web-server').size.must_equal 1
+    @driver.hardware_profiles(:id => 'web-server').first.name.must_equal 'web-server'
+    @driver.hardware_profiles(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single hardware_profile' do
+    profile = @driver.hardware_profile(:id => 'database-server')
+    profile.wont_be_nil
+    profile.must_be_kind_of Deltacloud::HardwareProfile
+    profile.name.must_equal 'database-server'
+    profile.properties.must_be_kind_of Array
+    profile.properties.wont_be_empty
+    profile.properties.each do |p|
+      p.must_be_kind_of Deltacloud::HardwareProfile::Property
+      p.name.to_s.wont_be_empty
+      p.kind.to_s.wont_be_empty
+    end
+    @driver.hardware_profile(:id => 'unknown').must_be_nil
+  end
+
+end
+

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3563f0ea/server/tests/drivers/gogrid/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/images_test.rb b/server/tests/drivers/gogrid/images_test.rb
new file mode 100644
index 0000000..2c32baf
--- /dev/null
+++ b/server/tests/drivers/gogrid/images_test.rb
@@ -0,0 +1,46 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'GoGridDriver Images' do
+
+  before do
+    Time.be(DateTime.parse("2012-08-23 11:45:00 +0000").to_s)
+    @driver = Deltacloud::new(:gogrid, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of images' do
+    @driver.images.wont_be_empty
+    @driver.images.first.must_be_kind_of Image
+  end
+
+  it 'must allow to filter images' do
+    @driver.images(:id => '9928').wont_be_empty
+    @driver.images(:id => '9928').must_be_kind_of Array
+    @driver.images(:id => '9928').size.must_equal 1
+    @driver.images(:id => '9928').first.id.must_equal '9928'
+    @driver.images(:id => '9928').first.name.must_equal 'CentOS 5.6 (32-bit) w/ None'
+    @driver.images(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single image' do
+    @driver.image(:id => '9928').wont_be_nil
+    @driver.image(:id => '9928').must_be_kind_of Image
+    @driver.image(:id => '9928').id.must_equal '9928'
+    @driver.image(:id => 'unknown').must_be_nil
+  end
+
+end
+

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3563f0ea/server/tests/drivers/gogrid/instances_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/instances_test.rb b/server/tests/drivers/gogrid/instances_test.rb
new file mode 100644
index 0000000..136272b
--- /dev/null
+++ b/server/tests/drivers/gogrid/instances_test.rb
@@ -0,0 +1,49 @@
+
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'GoGridDriver Instances' do
+
+  before do
+    Time.be(DateTime.parse("2012-08-23 12:12:00 +0000").to_s)
+    @driver = Deltacloud::new(:gogrid, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of instances' do
+    @driver.instances.wont_be_empty
+    @driver.instances.first.must_be_kind_of Instance
+  end
+
+  it 'must allow to filter instances' do
+    @driver.instances(:id => 'test').wont_be_empty
+    @driver.instances(:id => 'test').must_be_kind_of Array
+    @driver.instances(:id => 'test').size.must_equal 1
+    @driver.instances(:id => 'test').first.id.must_equal 'test'
+    @driver.instances(:owner_id => '9bbf139b8b57d967').wont_be_empty
+    @driver.instances(:owner_id => '9bbf139b8b57d967').each do |inst|
+      inst.owner_id.must_equal '9bbf139b8b57d967'
+    end
+    @driver.instances(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single instance' do
+    @driver.instance(:id => 'test').wont_be_nil
+    @driver.instance(:id => 'test').must_be_kind_of Instance
+    @driver.instance(:id => 'test').id.must_equal 'test'
+    @driver.instance(:id => 'unknown').must_be_nil
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3563f0ea/server/tests/drivers/gogrid/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/realms_test.rb b/server/tests/drivers/gogrid/realms_test.rb
new file mode 100644
index 0000000..6b4d904
--- /dev/null
+++ b/server/tests/drivers/gogrid/realms_test.rb
@@ -0,0 +1,47 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'GoGridDriver Realms' do
+
+  before do
+    Time.be(DateTime.parse("2012-08-23 11:30:00 +0000").to_s)
+    @driver = Deltacloud::new(:gogrid, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.realms(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of realms' do
+    @driver.realms.wont_be_empty
+    @driver.realms.first.must_be_kind_of Realm
+  end
+
+  it 'must allow to filter realms' do
+    @driver.realms(:id => '1').wont_be_empty
+    @driver.realms(:id => '1').must_be_kind_of Array
+    @driver.realms(:id => '1').size.must_equal 1
+    @driver.realms(:id => '1').first.id.must_equal '1'
+    @driver.realms(:id => '1').first.name.must_equal 'US-West-1'
+    @driver.realms(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single realm' do
+    @driver.realm(:id => '1').wont_be_nil
+    @driver.realm(:id => '1').must_be_kind_of Realm
+    @driver.realm(:id => '1').id.must_equal '1'
+    @driver.realm(:id => '1').name.must_equal 'US-West-1'
+    @driver.realm(:id => 'unknown').must_be_nil
+  end
+
+end
+


Mime
View raw message