Reset password, api version check. #7804

Merged
merged 2 commits into from Aug 29, 2017

Conversation

Projects
None yet
3 participants
Member

anastasiamac commented Aug 28, 2017

Description of change

Reset password functionality was only introduced on UserManager v2. This means that older juju controllers will not be able to provide this functionality when used with later clients.

This PR adds an API version check and ensures that api conection is closed after the command has run. Tests have been added and adjusted accordingly.

QA steps

  1. Bootstrap an older version of Juju
  2. Using newer client (develop tip), try to call 'change-user-password' with --reset option.

Documentation changes

n/a

Bug reference

n/a

axw approved these changes Aug 29, 2017

cmd/juju/user/change_password.go
}
+ defer c.api.Close()
@axw

axw Aug 29, 2017

Member

it was in the right place, in the block that created the client (NewUserManagerAPIClient). please move it back

Member

anastasiamac commented Aug 29, 2017

$$merge$$

Contributor

jujubot commented Aug 29, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit f30dc36 into juju:develop Aug 29, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@anastasiamac anastasiamac deleted the anastasiamac:reset-pwd-api-version branch Aug 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment