mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-22 06:26:56 +01: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:
@@ -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