Skip to content

Commit

Permalink
Treat unknown project as valid (particulary to support openj9 binary …
Browse files Browse the repository at this point in the history
…uploads)
  • Loading branch information
judovana committed Oct 10, 2019
1 parent 786b3c0 commit 5fb931a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fake-koji/src/main/java/org/fakekoji/core/FakeBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,21 +239,20 @@ public String[] guessTags() throws ProjectMappingExceptions.ProjectMappingExcept
if (file.getName().toLowerCase().contains("win") && file.getParentFile().getName().toLowerCase().contains("win")) {
return prefixIfNecessary(TagsProvider.getWinTags());
}
}
} else
//oracle and ibm are far from being done. But at least start is sumarised there
if (name.endsWith("oracle")) {
//currently we have static only for linux
if (file.getName().toLowerCase().contains("static") || release.contains("upstream")) {
return prefixIfNecessary(connect(TagsProvider.getOracleTags()));
}
}
} else
if (name.endsWith("ibm")) {
//currently we have static only for linux
if (file.getName().toLowerCase().contains("static") || release.contains("upstream")) {
return prefixIfNecessary(connect(TagsProvider.getSuplementaryRhel5LikeTag(), TagsProvider.getSuplementaryRhel6LikeTag(), TagsProvider.getSuplementaryRhel7LikeTag()));
}
}
if (name.startsWith("thermostat-ng")) {
} else {
if (file.getName().toLowerCase().contains("static") || release.contains("upstream")) {
return prefixIfNecessary(connect(TagsProvider.getFedoraTags(), TagsProvider.getRHELtags(), TagsProvider.getRhelTags(), TagsProvider.getWinTags()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,26 @@ public void testListMatchingBuildsR7_oracle8() throws Exception {
Build build = worker.invoke(temporaryFolder.newFolder(), null);
assertNotNull(build);
}

@Test
public void testListMatchingBuildsAnything64_OpenJ9() throws Exception {
assumeTrue(onRhNet);
KojiListBuilds worker = new KojiListBuilds(new KojiScmConfig(
"http://hydra.brq.redhat.com:"+ JavaServerConstants.xPortAxiom + "/RPC2",
"http://hydra.brq.redhat.com:" + JavaServerConstants.dPortAxiom,
"java-1.8.0-openj9",
"x86_64",
"*",
"",
null,
null,
false,
false,
10
), new NotProcessedNvrPredicate(new ArrayList<>()));
Build build = worker.invoke(temporaryFolder.newFolder(), null);
assertNotNull(build);
}

@Test
public void testListMatchingBuildsWindows() throws Exception {
Expand Down

0 comments on commit 5fb931a

Please sign in to comment.