github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/resetstate/testing/requests_test.go (about) 1 package testing 2 3 import ( 4 "testing" 5 6 "github.com/huaweicloud/golangsdk/openstack/compute/v2/extensions/resetstate" 7 th "github.com/huaweicloud/golangsdk/testhelper" 8 "github.com/huaweicloud/golangsdk/testhelper/client" 9 ) 10 11 const serverID = "b16ba811-199d-4ffd-8839-ba96c1185a67" 12 13 func TestResetState(t *testing.T) { 14 th.SetupHTTP() 15 defer th.TeardownHTTP() 16 17 mockResetStateResponse(t, serverID, "active") 18 19 err := resetstate.ResetState(client.ServiceClient(), serverID, "active").ExtractErr() 20 th.AssertNoErr(t, err) 21 }