Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Valentijn Scholten <[email protected]>
  • Loading branch information
valentijnscholten committed Jan 12, 2025
1 parent 0318f3e commit e392719
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ private List<Permission> getBadgesPermissions(final List<Permission> fullList) {
public void loadDefaultRepositories() {
try (QueryManager qm = new QueryManager()) {
LOGGER.info("Synchronizing default repositories to datastore");
//TODO VS Update docs
qm.createRepository(RepositoryType.CPAN, "cpan-public-registry", "https://fastapi.metacpan.org/v1/", true, false, false, null, null, null);
qm.createRepository(RepositoryType.GEM, "rubygems.org", "https://rubygems.org/", true, false, false, null, null, null);
qm.createRepository(RepositoryType.HEX, "hex.pm", "https://hex.pm/", true, false, false, null, null, null);
Expand All @@ -233,7 +232,7 @@ public void loadDefaultRepositories() {
qm.createRepository(RepositoryType.CARGO, "crates.io", "https://crates.io", true, false, false, null, null, null);
qm.createRepository(RepositoryType.GO_MODULES, "proxy.golang.org", "https://proxy.golang.org", true, false, false, null, null, null);
qm.createRepository(RepositoryType.GITHUB, "github.com", "https://github.com", true, false, false, null, null, null);
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ public void getRepositoryMetaUntrackedComponentTest() {
Assert.assertEquals("The repository metadata for the specified component cannot be found.", body);
}


//TODO VS Add create repository with config advisory mirroring
@Test
public void createRepositoryTest() {
Repository repository = new Repository();
Expand All @@ -191,7 +189,6 @@ public void createRepositoryTest() {
.put(Entity.entity(repository, MediaType.APPLICATION_JSON));
Assert.assertEquals(201, response.getStatus());


response = jersey.target(V1_REPOSITORY).request().header(X_API_KEY, apiKey).get(Response.class);
Assert.assertEquals(200, response.getStatus(), 0);
Assert.assertEquals(String.valueOf(19), response.getHeaderString(TOTAL_COUNT_HEADER));
Expand Down Expand Up @@ -223,7 +220,6 @@ public void createNonInternalRepositoryTest() {
.put(Entity.entity(repository, MediaType.APPLICATION_JSON));
Assert.assertEquals(201, response.getStatus());


response = jersey.target(V1_REPOSITORY).request().header(X_API_KEY, apiKey).get(Response.class);
Assert.assertEquals(200, response.getStatus(), 0);
Assert.assertEquals(String.valueOf(19), response.getHeaderString(TOTAL_COUNT_HEADER));
Expand Down

0 comments on commit e392719

Please sign in to comment.