Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test debug #43

Merged
merged 2 commits into from
Sep 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions dev/devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schemaVersion: 2.0.0
metadata:
name: java-openliberty
version: 0.1.2
version: 0.1.3
description: Java application stack using Open Liberty runtime
starterProjects:
- name: user-app
Expand All @@ -14,7 +14,7 @@ components:
name: devruntime
# this custom image source can be found in the baseimage section of the repo at:
# https://github.com/OpenLiberty/application-stack.git
image: ajymau/java-openliberty-odo:0.1.2
image: ajymau/java-openliberty-odo:0.1.3
memoryLimit: 1512Mi
mountSources: true
endpoints:
Expand Down Expand Up @@ -43,8 +43,8 @@ commands:
else
echo "will run the devBuild command" && echo "...moving liberty"
&& mkdir -p /projects/target/liberty
&& mv /opt/ol/wlp /projects/target/liberty
&& mvn -Dmaven.repo.local=/mvn/repository package
&& mv /opt/ol/wlp /projects/target/liberty
&& touch ./.disable-bld-cmd;
fi
workingDir: /projects
Expand All @@ -54,22 +54,42 @@ commands:
kind: build
isDefault: true
- exec:
id: devRun
id: run
component: devruntime
commandLine: mvn -Dmaven.repo.local=/mvn/repository -Dliberty.runtime.version=20.0.0.9 -DhotTests=true liberty:dev
commandLine: mvn -Dmaven.repo.local=/mvn/repository -Dliberty.runtime.version=20.0.0.9 -Ddebug=false -DhotTests=true -DcompileWait=3 liberty:dev
workingDir: /projects
attributes:
restart: "false"
group:
kind: run
isDefault: true
- exec:
id: devRunDisableHotTests
id: run-test-off
component: devruntime
commandLine: mvn -Dmaven.repo.local=/mvn/repository -Dliberty.runtime.version=20.0.0.9 liberty:dev
commandLine: mvn -Dmaven.repo.local=/mvn/repository -Dliberty.runtime.version=20.0.0.9 -Ddebug=false liberty:dev
workingDir: /projects
attributes:
restart: "false"
group:
kind: run
isDefault: false
- exec:
id: debug
component: devruntime
commandLine: mvn -Dmaven.repo.local=/mvn/repository -Dliberty.runtime.version=20.0.0.9 -DdebugPort=${DEBUG_PORT} liberty:dev -Dliberty.env.WLP_DEBUG_REMOTE=y
workingDir: /projects
attributes:
restart: "false"
group:
kind: debug
isDefault: true
- exec:
id: test
component: devruntime
commandLine: mvn -Dmaven.repo.local=/mvn/repository -Dmicroshed_hostname=localhost -Dmicroshed_http_port=9080 -Dmicroshed_manual_env=true -Dmicroshed_app_context_root=/ failsafe:integration-test
workingDir: /projects
attributes:
restart: "false"
group:
kind: test
isDefault: true
1 change: 1 addition & 0 deletions templates/default/.odoignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
3 changes: 2 additions & 1 deletion templates/default/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<artifactId>liberty-maven-plugin</artifactId>
<version>${version.liberty-maven-plugin}</version>
<configuration>
<mergeServerEnv>true</mergeServerEnv>
<stripVersion>true</stripVersion>
<serverStartTimeout>360</serverStartTimeout>
<bootstrapProperties>
Expand Down Expand Up @@ -158,7 +159,7 @@
<executions>
<execution>
<phase>integration-test</phase>
<id>it-exec</id>
<id>default-cli</id>
<goals>
<goal>integration-test</goal>
</goals>
Expand Down
2 changes: 2 additions & 0 deletions templates/default/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
httpsPort="${default.https.port}" id="defaultHttpEndpoint"/>

<httpDispatcher enableWelcomePage="false" />

<webApplication contextRoot="/" location="starter.war" />

</server>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class JaxrsTestit {

@Container
public static ApplicationContainer app = new ApplicationContainer()
.withAppContextRoot("/starter")
.withAppContextRoot("/")
.withReadinessPath("/health/ready")
.withEnv("DEFAULT_HTTP_PORT", "9080")
.withEnv("DEFAULT_HTTPS_PORT", "9443");
Expand All @@ -47,4 +47,4 @@ public void testAppResponse() {
assertEquals("Hello! Welcome to Openliberty", appService.getRequest());
}

}
}