-
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
Add possibility to get branch Model Condition #68
Conversation
…o branchModel-list # Conflicts: # src/main/java/com/cdancy/bitbucket/rest/fallbacks/BitbucketFallbacks.java
@@ -0,0 +1,50 @@ | |||
/* |
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.
Should this file be here? Doesn't seem to be used
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.
I use in another PR (#69).
@AfterClass | ||
public void fin() { | ||
boolean success = api().updateDefault(projectKey, repoKey, defaultBranchId); | ||
assertThat(success).isTrue(); | ||
success = api().delete(projectKey, repoKey, "refs/heads/" + branchName); | ||
assertThat(success).isTrue(); | ||
if (branchModelConfiguration != null) { | ||
checkDefaultBranchConfiguration(); |
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.
Do we need to do this check twice?
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.
Oops, This line is for update
@Test(dependsOnMethods = {"testCreateBranch", "testListBranches"}) | ||
public void testGetBranchModelConfiguration() { | ||
branchModelConfiguration = api().getModelConfiguration(projectKey, repoKey); | ||
checkDefaultBranchConfiguration(); |
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.
If we don't need to do this check twice than lets remove the checkDefaultBranchConfiguration
method and instead add that code here.
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.
Seen you pushed a commit but missed this. Not sure if you were planning on addressing with a subsequent commit.
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.
If I remove it, I need to readd it in another PR (#69)
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.
Gotcha ... yeah looking at that PR now. Ok lets keep it then.
@@ -17,17 +17,16 @@ | |||
|
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.
Another LiveTest to check for errors? Maybe named something like testGetBranchModelConfigurationOnError()
?
private void checkDefaultBranchConfiguration() { | ||
assertThat(branchModelConfiguration).isNotNull(); | ||
assertThat(branchModelConfiguration.errors().isEmpty()).isTrue(); | ||
assertThat(branchModelConfiguration.development().refId()).isNotNull(); |
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.
No description provided.