added Authentication Check

Added additional authentication checks on gitHubBeforeAfter so that cleanup is done with a user logged in
This commit is contained in:
Alex Taylor
2020-01-27 15:24:28 -05:00
parent 7c495c2177
commit 4c3a0d329b
16 changed files with 39 additions and 37 deletions

View File

@@ -43,11 +43,11 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest {
@Before
public void setupRepo() throws Exception {
if (mockGitHub.isUseProxy()) {
for (GHPullRequest pr : getRepository(this.gitHubBeforeAfter).getPullRequests(GHIssueState.OPEN)) {
for (GHPullRequest pr : getRepository(this.getGitHubBeforeAfter()).getPullRequests(GHIssueState.OPEN)) {
pr.close();
}
try {
GHRef ref = getRepository(this.gitHubBeforeAfter).getRef(testRefName);
GHRef ref = getRepository(this.getGitHubBeforeAfter()).getRef(testRefName);
ref.delete();
} catch (IOException e) {
}