| package servergroups |
| |
| import ( |
| "testing" |
| |
| th "github.com/gophercloud/gophercloud/testhelper" |
| "github.com/gophercloud/gophercloud/testhelper/client" |
| ) |
| |
| func TestListURL(t *testing.T) { |
| th.SetupHTTP() |
| defer th.TeardownHTTP() |
| c := client.ServiceClient() |
| |
| th.CheckEquals(t, c.Endpoint+"os-server-groups", listURL(c)) |
| } |
| |
| func TestCreateURL(t *testing.T) { |
| th.SetupHTTP() |
| defer th.TeardownHTTP() |
| c := client.ServiceClient() |
| |
| th.CheckEquals(t, c.Endpoint+"os-server-groups", createURL(c)) |
| } |
| |
| func TestGetURL(t *testing.T) { |
| th.SetupHTTP() |
| defer th.TeardownHTTP() |
| c := client.ServiceClient() |
| id := "1" |
| |
| th.CheckEquals(t, c.Endpoint+"os-server-groups/"+id, getURL(c, id)) |
| } |
| |
| func TestDeleteURL(t *testing.T) { |
| th.SetupHTTP() |
| defer th.TeardownHTTP() |
| c := client.ServiceClient() |
| id := "1" |
| |
| th.CheckEquals(t, c.Endpoint+"os-server-groups/"+id, deleteURL(c, id)) |
| } |