mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-06-13 03:31:09 +02:00
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:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION:=11.0.9_11.1
|
||||
VERSION:=8u275-b01
|
||||
|
||||
.PHONY:build
|
||||
build:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user