Skip to content

Commit 959eb46

Browse files
committed
Deleted unit test cleanup method.
This method failed in the automated GitHub build online with a null pointer exception. I tried to make it a @Before/@after method, but that fails on my local PC.
1 parent 998bda9 commit 959eb46

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

src/test/java/org/kohsuke/github/GHRepositoryTest.java

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,19 +344,27 @@ public void getPostCommitHooks() throws Exception {
344344
assertThat(postcommitHooks.size(), equalTo(0));
345345
}
346346

347-
public void cleanUpTags() throws Exception {
348-
GHRepository repo = getRepository(gitHubBeforeAfter);
349-
350-
GHRef ref = repo.getRef("tags/create_tag_test");
351-
if (ref != null) {
352-
ref.delete();
353-
}
354-
}
347+
// @Before
348+
// @After
349+
// public void cleanUpTags() throws Exception {
350+
// // Cleanup is only needed when proxying
351+
// if (!mockGitHub.isUseProxy()) {
352+
// return;
353+
// }
354+
//
355+
// try {
356+
// GHRef ref = getRepository(this.gitHubBeforeAfter).getRef("tags/create_tag_test");
357+
// if (ref != null) {
358+
// ref.delete();
359+
// }
360+
// } catch (IOException e) {
361+
// // The reference probably does not exist.
362+
// // This is safe to ignore.
363+
// }
364+
// }
355365

356366
@Test
357367
public void testCreateTag() throws Exception {
358-
cleanUpTags();
359-
360368
GHRepository repo = getRepository(gitHub);
361369

362370
String commitSha = "dfe47235cfdcaa12292dab3b1a84ca53a1ceadaf";

0 commit comments

Comments
 (0)