| 1 | package cloudapi_test |
| 2 | |
| 3 | import ( |
| 4 | gc "launchpad.net/gocheck" |
| 5 | |
| 6 | "github.com/joyent/gosdc/cloudapi" |
| 7 | ) |
| 8 | |
| 9 | func (s *LocalTests) TestListNetworks(c *gc.C) { |
| 10 | nets, err := s.testClient.ListNetworks() |
| 11 | c.Assert(err, gc.IsNil) |
| 12 | c.Assert(nets, gc.NotNil) |
| 13 | } |
| 14 | |
| 15 | func (s *LocalTests) TestGetNetwork(c *gc.C) { |
| 16 | net, err := s.testClient.GetNetwork(localNetworkID) |
| 17 | c.Assert(err, gc.IsNil) |
| 18 | c.Assert(net, gc.NotNil) |
| 19 | c.Assert(net, gc.DeepEquals, &cloudapi.Network{ |
| 20 | Id: localNetworkID, |
| 21 | Name: "Test-Joyent-Public", |
| 22 | Public: true, |
| 23 | Description: "", |
| 24 | }) |
| 25 | } |