blob: bff4dfc7205fb632a1f207723a97659ea03d5aad [file] [log] [blame]
Joe Topjianc9fb21b2015-02-22 05:55:48 +00001package servergroups
2
3import (
4 "testing"
5
6 th "github.com/rackspace/gophercloud/testhelper"
7 "github.com/rackspace/gophercloud/testhelper/client"
8)
9
10func TestListURL(t *testing.T) {
11 th.SetupHTTP()
12 defer th.TeardownHTTP()
13 c := client.ServiceClient()
14
15 th.CheckEquals(t, c.Endpoint+"os-server-groups", listURL(c))
16}
17
18func TestCreateURL(t *testing.T) {
19 th.SetupHTTP()
20 defer th.TeardownHTTP()
21 c := client.ServiceClient()
22
23 th.CheckEquals(t, c.Endpoint+"os-server-groups", createURL(c))
24}
25
26func TestGetURL(t *testing.T) {
27 th.SetupHTTP()
28 defer th.TeardownHTTP()
29 c := client.ServiceClient()
30 id := "1"
31
32 th.CheckEquals(t, c.Endpoint+"os-server-groups/"+id, getURL(c, id))
33}
34
35func TestDeleteURL(t *testing.T) {
36 th.SetupHTTP()
37 defer th.TeardownHTTP()
38 c := client.ServiceClient()
39 id := "1"
40
41 th.CheckEquals(t, c.Endpoint+"os-server-groups/"+id, deleteURL(c, id))
42}