Commit 27f783ca authored by Greg Messner's avatar Greg Messner
Browse files

Changed deleteImpersonationToken() to revokeImpersonationToken() (#91).

parent dfad2d80
......@@ -606,15 +606,15 @@ public class UserApi extends AbstractApi {
}
/**
* Deletes an impersonation token. Available only for admin users.
* Revokes an impersonation token. Available only for admin users.
*
* DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id
*
* @param userId the user ID of the user to delete the impersonation token for
* @param tokenId the impersonation token ID to delete
* @param userId the user ID of the user to revoke the impersonation token for
* @param tokenId the impersonation token ID to revoke
* @throws GitLabApiException if any exception occurs
*/
public void deleteImpersonationToken(Integer userId, Integer tokenId) throws GitLabApiException {
public void revokeImpersonationToken(Integer userId, Integer tokenId) throws GitLabApiException {
if (userId == null) {
throw new RuntimeException("userId cannot be null");
......
......@@ -152,7 +152,7 @@ public class TestUserApi {
assertEquals(TEST_IMPERSONATION_TOKEN_NAME, token.getName());
assertEquals(2, token.getScopes().size());
gitLabApi.getUserApi().deleteImpersonationToken(user.getId(), token.getId());
gitLabApi.getUserApi().revokeImpersonationToken(user.getId(), token.getId());
}
@Test
......@@ -174,7 +174,7 @@ public class TestUserApi {
assertNotNull(tokens);
assertTrue(tokens.size() > 0);
gitLabApi.getUserApi().deleteImpersonationToken(user.getId(), createdToken.getId());
gitLabApi.getUserApi().revokeImpersonationToken(user.getId(), createdToken.getId());
}
@Test
......@@ -191,7 +191,7 @@ public class TestUserApi {
assertEquals(createdToken.getId(), token.getId());
assertTrue(token.getActive());
gitLabApi.getUserApi().deleteImpersonationToken(user.getId(), createdToken.getId());
gitLabApi.getUserApi().revokeImpersonationToken(user.getId(), createdToken.getId());
token = gitLabApi.getUserApi().getImpersonationToken(user.getId(), createdToken.getId());
assertFalse(token.getActive());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment