Пример #1
0
func TestEnableRootUser(t *testing.T) {
	th.SetupHTTP()
	defer th.TeardownHTTP()
	HandleEnableRoot(t)

	expected := &users.User{Name: "root", Password: "******"}
	user, err := instances.EnableRootUser(fake.ServiceClient(), instanceID).Extract()

	th.AssertNoErr(t, err)
	th.AssertDeepEquals(t, expected, user)
}
Пример #2
0
func (c context) enableRootUser() {
	_, err := instances.EnableRootUser(c.client, c.instanceID).Extract()
	c.AssertNoErr(err)
	c.Logf("Enabled root user on %s", c.instanceID)
}