test new Jenkinsfile and switch integration test port to 8888

This commit is contained in:
anhefti 2024-03-04 16:41:18 +01:00
parent 26406b4fdb
commit 015806db5b
6 changed files with 37 additions and 7 deletions

32
Jenkinsfile vendored
View file

@ -14,12 +14,42 @@ pipeline {
stages {
stage('Maven build') {
steps {
withMaven(maven: 'Maven3.9.6') {
withMaven(maven: 'Maven3.9.6', options: [findbugsPublisher(disabled: true)]) {
sh "mvn clean install"
}
}
}
stage('Reporting') {
steps {
withMaven(maven: 'Maven', options: [findbugsPublisher(disabled: true)]) {
sh "mvn --batch-mode -V -U -e -P let_reporting pmd:pmd pmd:cpd findbugs:findbugs spotbugs:spotbugs"
}
}
}
}
post {
always {
junit testResults: '**/target/surefire-reports/TEST-*.xml'
recordIssues enabledForFailure: true, tool: spotBugs()
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml')
}
failure {
setBuildStatus("Build failed", "FAILURE");
emailext body: "The build of the LET Application (${env.JOB_NAME}) failed! See ${env.BUILD_URL}", recipientProviders: [[$class: 'CulpritsRecipientProvider']], subject: 'LET Application Build Failure'
}
success {
setBuildStatus("Build complete", "SUCCESS");
}
}
options {
timeout(time: 10, unit: 'MINUTES')
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '7'))
}
triggers {
pollSCM('H/5 * * * *')
}
}

View file

@ -16,9 +16,9 @@ public class ProxyDataTest {
@Test
public void testCreation() {
final ProxyData proxyData = new ProxyData("proxyName", 8080, new ClientCredentials("user1", "password"));
final ProxyData proxyData = new ProxyData("proxyName", 8888, new ClientCredentials("user1", "password"));
assertEquals(
"ProxyData [proxyName=proxyName, proxyPort=8080, clientCredentials=ClientCredentials [clientId=user1]]",
"ProxyData [proxyName=proxyName, proxyPort=8888, clientCredentials=ClientCredentials [clientId=user1]]",
proxyData.toString());
}

View file

@ -80,7 +80,7 @@ public abstract class GuiIntegrationTest {
final HttpSession sessionMock = Mockito.mock(HttpSession.class);
final WebserviceURIService webserviceURIService = new WebserviceURIService(
"http", "localhost", "8080", "/", this.endpoint);
"http", "localhost", "8888", "/", this.endpoint);
final ClientHttpRequestFactoryService clientHttpRequestFactoryService = Mockito
.mock(ClientHttpRequestFactoryService.class);

View file

@ -79,7 +79,7 @@ public class SEBClientBot {
private final ObjectMapper jsonMapper = new ObjectMapper();
private final Random random = new Random();
String webserviceAddress = "http://localhost:8080";
String webserviceAddress = "http://localhost:8888";
String accessTokenEndpoint = "/oauth/token";
String clientId = "test";
String sessionId = null;

View file

@ -2922,7 +2922,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
.getBuilder(NewLmsSetup.class)
.withFormParam(Domain.LMS_SETUP.ATTR_NAME, "Test Open edx")
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_TYPE, LmsType.OPEN_EDX.name())
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_URL, "http://localhost:8080/openedxtest")
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_URL, "http://localhost:8888/openedxtest")
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_CLIENTNAME, "test")
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_CLIENTSECRET, "test")
.call();

View file

@ -6,7 +6,7 @@ spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
server.address=localhost
server.port=8080
server.port=8888
server.servlet.context-path=/
spring.main.allow-bean-definition-overriding=true