blob: 97a121b19aa025450dd8b8360f9cd1d4eaaa2037 [file] [log] [blame]
Jamie Hannaford583e23d2014-11-13 13:22:29 +01001package startstop
2
3import (
4 "testing"
5
6 th "github.com/rackspace/gophercloud/testhelper"
7 "github.com/rackspace/gophercloud/testhelper/client"
8)
9
10const serverID = "{serverId}"
11
12func TestStart(t *testing.T) {
13 th.SetupHTTP()
14 defer th.TeardownHTTP()
15
16 mockStartServerResponse(t, serverID)
17
18 err := Start(client.ServiceClient(), serverID).ExtractErr()
19 th.AssertNoErr(t, err)
20}
21
22func TestStop(t *testing.T) {
23 th.SetupHTTP()
24 defer th.TeardownHTTP()
25
26 mockStopServerResponse(t, serverID)
27
28 err := Stop(client.ServiceClient(), serverID).ExtractErr()
29 th.AssertNoErr(t, err)
30}