blob: 97a121b19aa025450dd8b8360f9cd1d4eaaa2037 [file] [log] [blame]
package startstop
import (
"testing"
th "github.com/rackspace/gophercloud/testhelper"
"github.com/rackspace/gophercloud/testhelper/client"
)
const serverID = "{serverId}"
func TestStart(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
mockStartServerResponse(t, serverID)
err := Start(client.ServiceClient(), serverID).ExtractErr()
th.AssertNoErr(t, err)
}
func TestStop(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
mockStopServerResponse(t, serverID)
err := Stop(client.ServiceClient(), serverID).ExtractErr()
th.AssertNoErr(t, err)
}