Downgrade Jenkins JDK version to Java 8 (#1473)

* Downgrade Jenkins JDK version to Java 8

The unit tests cannot run properly with Java 11.
We have to downgrade our image to use Java 8
instead until we have fixed this issue.

* Fix unit tests that have not been adapted during
   the failed builds

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
Eduard Heimbuch
2020-12-14 11:40:50 +01:00
committed by GitHub
parent fed16f296a
commit a4f559f9c1
6 changed files with 7 additions and 7 deletions

2
Jenkinsfile vendored
View File

@@ -204,7 +204,7 @@ String developmentBranch
String mainBranch
Maven setupMavenBuild() {
MavenWrapperInDocker mvn = new MavenWrapperInDocker(this, "scmmanager/java-build:11.0.9_11.1")
MavenWrapperInDocker mvn = new MavenWrapperInDocker(this, "scmmanager/java-build:8u275-b01")
mvn.enableDockerHost = true
// disable logging durring the build

View File

@@ -22,7 +22,7 @@
# SOFTWARE.
#
FROM adoptopenjdk/openjdk11:x86_64-debian-jdk-11.0.9_11.1
FROM adoptopenjdk/openjdk8:x86_64-debian-jdk8u275-b01
ENV DOCKER_VERSION=19.03.8 \
DOCKER_CHANNEL=stable \

View File

@@ -1,4 +1,4 @@
VERSION:=11.0.9_11.1
VERSION:=8u275-b01
.PHONY:build
build:

View File

@@ -275,7 +275,7 @@ public class BranchRootResourceTest extends RepositoryTestBase {
@Test
public void shouldNotDeleteBranchIfNotPermitted() throws IOException, URISyntaxException {
doThrow(AuthorizationException.class).when(subject).checkPermission("repository:modify:repoId");
doThrow(AuthorizationException.class).when(subject).checkPermission("repository:push:repoId");
when(branchesCommandBuilder.getBranches()).thenReturn(new Branches(Branch.normalBranch("suspicious", "0")));
MockHttpRequest request = MockHttpRequest

View File

@@ -325,7 +325,7 @@ public class TagRootResourceTest extends RepositoryTestBase {
@Test
public void shouldNotDeleteTagIfNotPermitted() throws IOException, URISyntaxException {
doThrow(AuthorizationException.class).when(subject).checkPermission("repository:modify:repoId");
doThrow(AuthorizationException.class).when(subject).checkPermission("repository:push:repoId");
Tags tags = new Tags();
tags.setTags(Collections.singletonList(new Tag("newtag", "592d797cd36432e591416e8b2b98154f4f163411")));
when(tagsCommandBuilder.getTags()).thenReturn(tags);

View File

@@ -85,13 +85,13 @@ public class AuthorizationChangedEventProducerTest {
private void assertUserEventIsFired(String username){
assertNotNull(producer.event);
assertTrue(producer.event.isEveryUserAffected());
assertFalse(producer.event.isEveryUserAffected());
assertEquals(username, producer.event.getNameOfAffectedUser());
}
private void assertGlobalEventIsFired(){
assertNotNull(producer.event);
assertFalse(producer.event.isEveryUserAffected());
assertTrue(producer.event.isEveryUserAffected());
}
/**