vorburger commented on a change in pull request #1465: URL: https://github.com/apache/fineract/pull/1465#discussion_r515821598
########## File path: integration-tests/build.gradle ########## @@ -0,0 +1,73 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +description = 'Fineract Integration Tests' + +apply plugin: 'com.bmuschko.cargo' + +// Configuration for the Gradle Cargo plugin +// https://github.com/bmuschko/gradle-cargo-plugin +configurations { + tomcat +} + +apply from: 'dependencies.gradle' + +cargo { + containerId "tomcat9x" + + // looks like Cargo doesn't detect the WAR file automatically in the multi-module setup + deployable { + file = file("$rootDir/fineract-provider/build/libs/fineract-provider.war") + context = 'fineract-provider' + } + + local { + installer { + installConfiguration = configurations.tomcat + downloadDir = file("$buildDir/download") + extractDir = file("$buildDir/tomcat") + } + startStopTimeout = 240000 + containerProperties { + property 'cargo.tomcat.connector.keystoreFile', file("$rootDir/fineract-provider/src/main/resources/keystore.jks") + property 'cargo.tomcat.connector.keystorePass', 'openmf' + property 'cargo.tomcat.httpSecure', true + property 'cargo.tomcat.connector.sslProtocol', 'TLS' + property 'cargo.tomcat.connector.clientAuth', false + property 'cargo.protocol', 'https' + property 'cargo.servlet.port', 8443 + } + } +} + +cargoRunLocal.dependsOn ':fineract-provider:war' +cargoStartLocal.dependsOn ':fineract-provider:war' +cargoStartLocal.mustRunAfter 'testClasses' + +test { + useJUnitPlatform() + testLogging { + // FINERACT-927 + events 'skipped', 'failed' + showStandardStreams = false + exceptionFormat 'full' + } Review comment: @vidakovic my Gradle foo isn't as strong as yours :smile: but isn't this "inherited" from the root `build.gradle`, after (my) #1477? It's not a big enough problem to not merge this ASAP anyway (I'm reviewing this right now..), but if you agree, then perhaps you want to raise a minor clean-up PR as follow-up? ########## File path: integration-tests/dependencies.gradle ########## @@ -0,0 +1,45 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +dependencies { + // testCompile dependencies are ONLY used in src/test, not src/main. + // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! + // + tomcat 'org.apache.tomcat:tomcat:9.0.39@zip' + testImplementation( files("$rootDir/fineract-provider/build/classes/java/main/"), + project(path: ':fineract-provider', configuration: 'runtimeElements'), + 'org.junit.jupiter:junit-jupiter-api:5.7.0', + 'com.google.truth:truth:1.0.1', + 'com.google.truth.extensions:truth-java8-extension:1.0.1', + 'org.awaitility:awaitility', + // 'com.google.code.gson:gson', + ) + testImplementation ('org.mock-server:mockserver-junit-jupiter') { + exclude group: 'com.sun.mail', module: 'mailapi' + exclude group: 'javax.servlet', module: 'javax.servlet-api' + exclude group: 'javax.validation' + } + testImplementation ('io.rest-assured:rest-assured') { + exclude group: 'commons-logging' + exclude group: 'org.apache.sling' + exclude group: 'com.sun.xml.bind' + } Review comment: @vidakovic given that this is here now, we should remove it from `fineract/fineract-provider/dependencies.gradle`, no? Again not a big enough problem to not merge this ASAP anyway (I'm reviewing this right now..), but if you agree, then perhaps you want to raise a minor clean-up PR as follow-up? ########## File path: .travis.yml ########## @@ -72,6 +72,6 @@ script: # using "&&" instead of several "-" means that integrationTest does not run if test fails, # and Docker test does not run if integration test fails, which makes PR failure easier to understand. # @see https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase - - ./gradlew --console=plain -PautomatedBuild=true licenseMain licenseTest licenseIntegrationTest check && ./gradlew --console=plain -PautomatedBuild=true build integrationTest --fail-fast && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 )) + - ./gradlew --console=plain -PautomatedBuild=true licenseMain licenseTest check -x test && ./gradlew --console=plain -PautomatedBuild=true build test --fail-fast && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 )) Review comment: FTR: FINERACT-1250 had a suggestion to simplify this, which we should try in a follow-up PR (I'll raise one). ########## File path: .travis.yml ########## @@ -72,6 +72,6 @@ script: # using "&&" instead of several "-" means that integrationTest does not run if test fails, # and Docker test does not run if integration test fails, which makes PR failure easier to understand. # @see https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase - - ./gradlew --console=plain -PautomatedBuild=true licenseMain licenseTest licenseIntegrationTest check && ./gradlew --console=plain -PautomatedBuild=true build integrationTest --fail-fast && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 )) + - ./gradlew --console=plain -PautomatedBuild=true licenseMain licenseTest check -x test && ./gradlew --console=plain -PautomatedBuild=true build test --fail-fast && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 )) Review comment: #1489 ########## File path: integration-tests/build.gradle ########## @@ -0,0 +1,73 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +description = 'Fineract Integration Tests' + +apply plugin: 'com.bmuschko.cargo' + +// Configuration for the Gradle Cargo plugin +// https://github.com/bmuschko/gradle-cargo-plugin +configurations { + tomcat +} + +apply from: 'dependencies.gradle' + +cargo { + containerId "tomcat9x" + + // looks like Cargo doesn't detect the WAR file automatically in the multi-module setup + deployable { + file = file("$rootDir/fineract-provider/build/libs/fineract-provider.war") + context = 'fineract-provider' + } + + local { + installer { + installConfiguration = configurations.tomcat + downloadDir = file("$buildDir/download") + extractDir = file("$buildDir/tomcat") + } + startStopTimeout = 240000 + containerProperties { + property 'cargo.tomcat.connector.keystoreFile', file("$rootDir/fineract-provider/src/main/resources/keystore.jks") + property 'cargo.tomcat.connector.keystorePass', 'openmf' + property 'cargo.tomcat.httpSecure', true + property 'cargo.tomcat.connector.sslProtocol', 'TLS' + property 'cargo.tomcat.connector.clientAuth', false + property 'cargo.protocol', 'https' + property 'cargo.servlet.port', 8443 + } + } +} + +cargoRunLocal.dependsOn ':fineract-provider:war' +cargoStartLocal.dependsOn ':fineract-provider:war' +cargoStartLocal.mustRunAfter 'testClasses' + +test { + useJUnitPlatform() + testLogging { + // FINERACT-927 + events 'skipped', 'failed' + showStandardStreams = false + exceptionFormat 'full' + } Review comment: #1490 ########## File path: integration-tests/dependencies.gradle ########## @@ -0,0 +1,45 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +dependencies { + // testCompile dependencies are ONLY used in src/test, not src/main. + // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! + // + tomcat 'org.apache.tomcat:tomcat:9.0.39@zip' + testImplementation( files("$rootDir/fineract-provider/build/classes/java/main/"), + project(path: ':fineract-provider', configuration: 'runtimeElements'), + 'org.junit.jupiter:junit-jupiter-api:5.7.0', + 'com.google.truth:truth:1.0.1', + 'com.google.truth.extensions:truth-java8-extension:1.0.1', + 'org.awaitility:awaitility', + // 'com.google.code.gson:gson', + ) + testImplementation ('org.mock-server:mockserver-junit-jupiter') { + exclude group: 'com.sun.mail', module: 'mailapi' + exclude group: 'javax.servlet', module: 'javax.servlet-api' + exclude group: 'javax.validation' + } + testImplementation ('io.rest-assured:rest-assured') { + exclude group: 'commons-logging' + exclude group: 'org.apache.sling' + exclude group: 'com.sun.xml.bind' + } Review comment: #1491 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
