Presence check needs to run on the same repo

This commit is contained in:
Kohsuke Kawaguchi
2014-05-10 15:46:14 -07:00
parent bf44232d5c
commit f8fe1dda6d

View File

@@ -19,12 +19,13 @@ public class LifecycleTest extends AbstractGitHubApiTestBase {
@Test
public void testCreateRepository() throws IOException, GitAPIException, InterruptedException {
GHMyself myself = gitHub.getMyself();
GHRepository repository = myself.getRepository("github-api-test");
GHOrganization org = gitHub.getOrganization("github-api-test-org");
GHRepository repository = org.getRepository("github-api-test");
if (repository != null) {
repository.delete();
Thread.sleep(1000);
}
repository = gitHub.getOrganization("github-api-test-org").createRepository("github-api-test",
repository = org.createRepository("github-api-test",
"a test repository used to test kohsuke's github-api", "http://github-api.kohsuke.org/", "Core Developers", true);
Thread.sleep(1000); // wait for the repository to become ready