Exemplo n.º 1
0
func (c context) restartInstance() {
	id := c.instanceID
	err := instances.Restart(c.client, id).ExtractErr()
	c.AssertNoErr(err)
	c.Logf("Restarting %s. Waiting...", id)
	c.WaitUntilActive(id)
	c.Logf("Restarted %s", id)
}
Exemplo n.º 2
0
func TestRestart(t *testing.T) {
	th.SetupHTTP()
	defer th.TeardownHTTP()
	HandleRestart(t)

	res := instances.Restart(fake.ServiceClient(), instanceID)
	th.AssertNoErr(t, res.Err)
}