Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-10.2.0' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
akantcheff committed Oct 2, 2024
2 parents 146bcda + 2320bdc commit 86c1c19
Show file tree
Hide file tree
Showing 104 changed files with 384 additions and 5,394 deletions.
1 change: 0 additions & 1 deletion bonita-engine-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies {
annotationProcessor(libs.springBootConfigurationProcessor)

testImplementation(libs.springBootTest)
testImplementation("junit:junit:${Deps.junit4Version}")
testImplementation("org.assertj:assertj-core:${Deps.assertjVersion}")
}

Expand Down
1 change: 0 additions & 1 deletion bonita-engine-standalone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {
compileOnly libs.lombok

testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"

// These 3 drivers are used for some specific tests:
Expand Down
1 change: 0 additions & 1 deletion bonita-integration-tests/benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
}

dependencies {
api "junit:junit:${Deps.junit4Version}"
api "org.assertj:assertj-core:${Deps.assertjVersion}"
api "org.mockito:mockito-core:${Deps.mockitoVersion}"
api project(':bonita-integration-tests:bonita-integration-tests-client')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
}
dependencies {
api project(':bonita-test-api')
api "junit:junit:${Deps.junit4Version}"
api libs.commonsIO
api project(':bpm:bonita-common')
api project(':bpm:bonita-client')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@
import org.bonitasoft.engine.api.PlatformAPI;
import org.bonitasoft.engine.api.PlatformAPIAccessor;
import org.bonitasoft.engine.api.TenantAPIAccessor;
import org.bonitasoft.engine.exception.*;
import org.bonitasoft.engine.exception.AlreadyExistsException;
import org.bonitasoft.engine.exception.BonitaException;
import org.bonitasoft.engine.exception.CreationException;
import org.bonitasoft.engine.exception.DeletionException;
import org.bonitasoft.engine.exception.NotFoundException;
import org.bonitasoft.engine.exception.SearchException;
import org.bonitasoft.engine.exception.UpdateException;
import org.bonitasoft.engine.identity.impl.IconImpl;
import org.bonitasoft.engine.platform.LoginException;
import org.bonitasoft.engine.platform.NodeNotStartedException;
import org.bonitasoft.engine.search.Order;
import org.bonitasoft.engine.search.SearchOptionsBuilder;
import org.bonitasoft.engine.search.SearchResult;
import org.bonitasoft.engine.session.PlatformSession;
import org.bonitasoft.platform.setup.PlatformSetup;
import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand Down Expand Up @@ -734,8 +738,6 @@ public void searchUserSortedById() throws BonitaException {
*/
@Test
public void should_search_user_case_insensitively() throws BonitaException {
Assume.assumeTrue("Search is case sensitive on our docker oracle",
!PlatformSetup.getPropertyBonitaBdmDbVendor().equals("oracle"));
List<User> users = asList(
getIdentityAPI().createUser("Jean_Michel", "bpm", "Jean Michel", "Jarre"),
getIdentityAPI().createUser("michel.mimi", "bpm", "Michel", "Mimi"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Copyright (C) 2024 Bonitasoft S.A.
* Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This library is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
package org.bonitasoft.engine.profile;

import static org.assertj.core.api.Assertions.assertThat;

import org.bonitasoft.engine.exception.BonitaException;
import org.bonitasoft.engine.search.Order;
import org.bonitasoft.engine.search.SearchOptionsBuilder;
import org.bonitasoft.engine.search.SearchResult;
import org.junit.Test;

/**
* Specific tests for the community edition on the profile API
*/
public class ProfileCommunityIT extends AbstractProfileIT {

@Test
public void searchProfile() throws BonitaException {
final SearchOptionsBuilder builder = new SearchOptionsBuilder(0, 10);
builder.sort(ProfileSearchDescriptor.NAME, Order.DESC);

final SearchResult<Profile> searchedProfiles = getProfileAPI().searchProfiles(builder.done());
assertThat(searchedProfiles.getCount()).isEqualTo(2);
assertThat(searchedProfiles.getResult().get(0).getName()).isEqualTo("User");
assertThat(searchedProfiles.getResult().get(1).getName()).isEqualTo("Administrator");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.bonitasoft.engine.search.Order;
import org.bonitasoft.engine.search.SearchOptionsBuilder;
import org.bonitasoft.engine.search.SearchResult;
import org.junit.Assume;
import org.junit.Test;

/**
Expand Down Expand Up @@ -60,17 +59,6 @@ private List<String> getProfilesFromSession(User user, String password) throws L
return profiles;
}

@Test
public void searchProfile() throws BonitaException {
Assume.assumeTrue("Community only", isCommunityEdition());
final SearchOptionsBuilder builder = new SearchOptionsBuilder(0, 10);
builder.sort(ProfileSearchDescriptor.NAME, Order.DESC);

final SearchResult<Profile> searchedProfiles = getProfileAPI().searchProfiles(builder.done());
assertThat(searchedProfiles.getCount()).isEqualTo(2);
assertEquals("User", searchedProfiles.getResult().get(0).getName());
}

@Test
public void searchProfileWithSearchTerm() throws BonitaException {
final SearchOptionsBuilder builder = new SearchOptionsBuilder(0, 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id("bonita-tests")
}
dependencies {
api "junit:junit:${Deps.junit4Version}"
api "org.assertj:assertj-core:${Deps.assertjVersion}"
api "org.mockito:mockito-core:${Deps.mockitoVersion}"
api project(':bonita-integration-tests:bonita-integration-tests-client')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies {
implementation libs.slf4jApi
implementation libs.commonsIO
implementation libs.jakartaServletApi
implementation libs.junit4
implementation libs.springTest
testImplementation "org.hamcrest:hamcrest:${Deps.hamcrestVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
Expand Down
7 changes: 3 additions & 4 deletions bonita-integration-tests/bonita-query-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
plugins { id 'bonita-docker-database' }

dependencies {
testAnnotationProcessor(libs.lombok)
testImplementation(libs.lombok)
testImplementation "junit:junit:${Deps.junit4Version}"
testAnnotationProcessor libs.lombok
testImplementation libs.lombok
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation libs.h2
testImplementation libs.springBeans
Expand All @@ -18,4 +17,4 @@ dependencies {
testRuntimeOnly libs.tomcatDbcp
}

databaseIntegrationTest { include "**/*Test.class" }
databaseIntegrationTest { include "**/*Test.class" }
2 changes: 1 addition & 1 deletion bonita-integration-tests/bonita-test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ dependencies {
api project(':bpm:bonita-client')
api project(':bpm:bonita-common')
api project(':bonita-test-api')
api "junit:junit:${Deps.junit4Version}"
api libs.commonsIO
api "xmlunit:xmlunit:${Deps.xmlunitVersion}"
api "org.assertj:assertj-core:${Deps.assertjVersion}"

implementation project(':bpm:bonita-core:bonita-process-engine')
implementation libs.junit4
implementation libs.springTest
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
import org.bonitasoft.engine.operation.Operation;
import org.bonitasoft.engine.page.Page;
import org.bonitasoft.engine.page.PageSearchDescriptor;
import org.bonitasoft.engine.platform.PlatformNotFoundException;
import org.bonitasoft.engine.search.Order;
import org.bonitasoft.engine.search.SearchOptionsBuilder;
import org.bonitasoft.engine.search.SearchResult;
Expand Down Expand Up @@ -1862,11 +1861,4 @@ private boolean isADefaultMethod(final Method method) {
return DEFAULT_METHODS.contains(method.getName());
}

protected boolean isCommunityEdition() {
try {
return "community".equalsIgnoreCase(getPlatformInformationAPI().getPlatformInformation().get("edition"));
} catch (PlatformNotFoundException e) {
throw new RuntimeException(e);
}
}
}
2 changes: 1 addition & 1 deletion bonita-test-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
api libs.commonsIO
api project(':bonita-engine-standalone')
api "junit:junit:${Deps.junit4Version}"
api libs.junit4
api(project(':platform:platform-resources'))

implementation libs.springTest
Expand Down
8 changes: 0 additions & 8 deletions bpm/bonita-api/bonita-server-api-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ dependencies {
api libs.commonsFileUpload
api libs.commonsIO
testImplementation libs.springTest
testImplementation libs.junit5api
testRuntimeOnly libs.junitJupiterEngine
testImplementation libs.junit4
testRuntimeOnly libs.junitVintageEngine
testImplementation "org.mockito:mockito-junit-jupiter:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
Expand All @@ -20,7 +16,3 @@ dependencies {
compileOnly libs.jakartaServletApi
testImplementation libs.jakartaServletApi
}

test {
useJUnitPlatform()
}
1 change: 0 additions & 1 deletion bpm/bonita-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencies {
api libs.httpComponentsClient
api libs.xstream
api libs.httpComponentsMime
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation libs.logback
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {
annotationProcessor libs.lombok

testImplementation project(':bpm:bonita-sap-jco-connector-api')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation libs.logback
Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-actor-mapping/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
api project(':services:bonita-events')
api project(':services:bonita-log')
api project(':services:bonita-persistence')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"

Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-category/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
api project(':services:bonita-events')
api project(':services:bonita-log')
api project(':services:bonita-persistence')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"

annotationProcessor libs.lombok
Expand Down
4 changes: 0 additions & 4 deletions bpm/bonita-core/bonita-contract-data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ dependencies {
implementation 'org.bonitasoft.engine:bonita-process-definition-model'
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation libs.junit5api
testImplementation libs.junit4
testRuntimeOnly(libs.junitJupiterEngine)
testRuntimeOnly(libs.junitVintageEngine)
annotationProcessor libs.lombok
compileOnly libs.lombok
}
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-core-data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies {
api libs.commonsLang
api project(':services:bonita-cache')
api project(':services:bonita-persistence')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
}
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-form-mapping/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencies {
api project(':services:bonita-commons')
api project(':services:bonita-events')
api libs.hibernateCore
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"

Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-home-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dependencies {
api project(':bpm:bonita-common')
api libs.commonsIO
api project(':platform:platform-resources')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"
Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-login/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies {
api project(':services:bonita-authentication')
api project(':services:bonita-profile')
api project(':services:bonita-authorization')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation libs.logback
Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-parameter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
api project(':services:bonita-cache')
api project(':services:bonita-builder')
api project(':services:bonita-persistence')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"
Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-platform-login/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ dependencies {
api project(':services:bonita-commons')
api project(':services:bonita-platform-session')
api project(':services:bonita-platform-authentication')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
}
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-process-definition/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies {
api project(':services:bonita-data-instance')
api project(':services:bonita-classloader')
api project(':services:bonita-builder')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation libs.logback
Expand Down
10 changes: 1 addition & 9 deletions bpm/bonita-core/bonita-process-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,9 @@ dependencies {
annotationProcessor libs.lombok
compileOnly libs.lombok

testImplementation "org.junit.jupiter:junit-jupiter-api:${Deps.junit5Version}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${Deps.junit5Version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${Deps.junit5Version}"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${Deps.junit5Version}"
testImplementation libs.junit5params
testAnnotationProcessor libs.lombok

testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-junit-jupiter:${Deps.mockitoVersion}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}" // works with Junit4
Expand All @@ -89,7 +85,3 @@ dependencies {
testImplementation "org.awaitility:awaitility:${Deps.awaitilityVersion}"
testRuntimeOnly libs.logback
}

test {
useJUnitPlatform()
}
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-process-instance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies {
api project(':bpm:bonita-core:bonita-contract-data')
api 'org.bonitasoft.engine:bonita-connector-model'

testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"
Expand Down
1 change: 0 additions & 1 deletion bpm/bonita-core/bonita-user-filter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {
api project(':bpm:bonita-core:bonita-process-instance')
api project(':bpm:bonita-core:bonita-home-server')
api project(':services:bonita-commons')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
}
1 change: 0 additions & 1 deletion bpm/bonita-external/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ dependencies {
api project(':bpm:bonita-core:bonita-process-engine')
api project(':services:bonita-command')
api project(':bpm:bonita-core:bonita-process-definition')
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
}
1 change: 0 additions & 1 deletion bpm/bonita-web-extensions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dependencies {
api(libs.javaxServletApi)
api(project(":bpm:bonita-client"))
api(project(":bpm:bonita-common"))
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
}

Expand Down
Loading

0 comments on commit 86c1c19

Please sign in to comment.