-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create/Delete permission group in repo #62
Create/Delete permission group in repo #62
Conversation
LGTM but will need some live tests before we can merge. |
# Conflicts: # src/main/java/com/cdancy/bitbucket/rest/features/RepositoryApi.java # src/test/java/com/cdancy/bitbucket/rest/features/RepositoryApiMockTest.java
@@ -119,6 +119,18 @@ public void testListPermissionByGroup() { | |||
assertThat(permissionsPage.values()).isEmpty(); | |||
} | |||
|
|||
@Test(dependsOnMethods = "testGetRepository") | |||
public void testCreatePermissionByGroupNonExistent() { | |||
boolean success = api().createPermissionsByGroup(projectKey, repoKey, "REPO_WRITE", randomString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually returns a 204 no content
. Can we update the test to reflect as much as well as the mock test to set the correct return code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is good, because It try to create permission group with group don't existent. If group don't exist, Bitbucket return a 404 Not Found.
One minor hiccup and I would like to see actual live tests that can succeed and work. Something like the below would suffice:
|
For me, default group in bitbucket is stash-users. |
This reverts commit ffc5b07.
@j0nathan33 yeah that works. One of these days we'll have to get a proper integration test flow going instead of this ad-hoc process I have now. That would be an awesome story/ISSUE to take on ;) |
In either event LGTM. Thanks @j0nathan33 ! |
No description provided.