Skip to content

Commit 8995d0d

Browse files
authored
Upgrade to mongo 7.0.15-jammy (#144)
1 parent 74b0e7c commit 8995d0d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
- Upgrade to `eclipse-temurin:11.0.24_8-jre-focal`. (#141)
1010
- Upgrade to Gradle 8.10.2. (#142)
1111
- Upgrade to `testcontainers` 1.20.4. (#143)
12+
- Upgrade to `mongo:7.0.15-jammy`. (#144)
1213

1314
## [[8.5.0]](https://github.com/iExecBlockchainComputing/iexec-result-proxy/releases/tag/v8.5.0) 2024-06-18
1415

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ testing {
108108

109109
tasks.withType(Test).configureEach {
110110
finalizedBy jacocoTestReport
111-
systemProperty "mongo.image", "mongo:4.4.28-focal"
111+
systemProperty "mongo.image", "mongo:7.0.15-jammy"
112112
}
113113

114114
tasks.register('itest', Test) {

src/test/java/com/iexec/resultproxy/authorization/AuthorizationServiceTests.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
import com.iexec.resultproxy.chain.IexecHubService;
2828
import org.junit.jupiter.api.BeforeEach;
2929
import org.junit.jupiter.api.Test;
30+
import org.junit.jupiter.api.extension.ExtendWith;
3031
import org.mockito.Mock;
31-
import org.mockito.MockitoAnnotations;
32+
import org.mockito.junit.jupiter.MockitoExtension;
3233
import org.springframework.beans.factory.annotation.Autowired;
3334
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;
3435
import org.springframework.test.context.DynamicPropertyRegistry;
@@ -59,6 +60,7 @@
5960

6061
@DataMongoTest
6162
@Testcontainers
63+
@ExtendWith(MockitoExtension.class)
6264
class AuthorizationServiceTests {
6365

6466
private static final String RESULT_DIGEST = "0x3210";
@@ -84,7 +86,6 @@ static void registerProperties(DynamicPropertyRegistry registry) {
8486

8587
@BeforeEach
8688
void beforeEach() throws GeneralSecurityException {
87-
MockitoAnnotations.openMocks(this);
8889
enclaveCreds = Credentials.create(Keys.createEcKeyPair());
8990
workerCreds = Credentials.create(Keys.createEcKeyPair());
9091
authorizationRepository.deleteAll();
@@ -135,7 +136,6 @@ void shouldNotBeAuthorizedOnExecutionOfTeeTaskWhenTaskTypeNotMatchedOnchainWithD
135136
@Test
136137
void shouldNotBeAuthorizedOnExecutionOfTeeTaskWhenGetTaskFailedWithDetails() {
137138
final WorkerpoolAuthorization auth = getWorkerpoolAuthorization(true);
138-
when(iexecHubService.isTeeTask(auth.getChainTaskId())).thenReturn(true);
139139
when(iexecHubService.getChainTask(auth.getChainTaskId())).thenReturn(Optional.empty());
140140

141141
Optional<AuthorizationError> isAuth = authorizationService.isAuthorizedOnExecutionWithDetailedIssue(auth);
@@ -149,7 +149,6 @@ void shouldNotBeAuthorizedOnExecutionOfTeeTaskWhenFinalDeadlineReached() {
149149
.dealid(CHAIN_DEAL_ID)
150150
.finalDeadline(Instant.now().minus(5L, ChronoUnit.SECONDS).toEpochMilli())
151151
.build();
152-
when(iexecHubService.isTeeTask(auth.getChainTaskId())).thenReturn(true);
153152
when(iexecHubService.getChainTask(auth.getChainTaskId())).thenReturn(Optional.of(chainTask));
154153

155154
Optional<AuthorizationError> isAuth = authorizationService.isAuthorizedOnExecutionWithDetailedIssue(auth);
@@ -162,7 +161,6 @@ void shouldNotBeAuthorizedOnExecutionOfTeeTaskWhenGetDealFailedWithDetails() {
162161
final WorkerpoolAuthorization auth = getWorkerpoolAuthorization(true);
163162
auth.setSignature(new Signature(POOL_WRONG_SIGNATURE));
164163

165-
when(iexecHubService.isTeeTask(auth.getChainTaskId())).thenReturn(true);
166164
when(iexecHubService.getChainTask(auth.getChainTaskId())).thenReturn(Optional.of(chainTask));
167165
when(iexecHubService.getChainDeal(chainTask.getDealid())).thenReturn(Optional.empty());
168166

0 commit comments

Comments
 (0)