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

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());
}
/**