Skip to content

Commit b6d33cb

Browse files
xiancaoddsharpe
authored andcommitted
Added integration tests for WDT (#415)
1 parent 7303edd commit b6d33cb

File tree

15 files changed

+1405
-38
lines changed

15 files changed

+1405
-38
lines changed

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pipeline {
44
alwaysPull true
55
reuseNode true
66
image 'phx.ocir.io/weblogick8s/wdt/jenkinsslave:wls12213'
7-
args '--user jenkins:oracle'
7+
args '-u jenkins -v /var/run/docker.sock:/var/run/docker.sock'
88
}
99
}
1010

@@ -26,9 +26,9 @@ pipeline {
2626
'''
2727
}
2828
}
29-
stage ('Test') {
29+
stage ('Verify') {
3030
steps {
31-
sh 'mvn -Dunit-test-wlst-dir=${WLST_DIR} test'
31+
sh 'mvn -Dunit-test-wlst-dir=${WLST_DIR} -Dmw_home=${ORACLE_HOME} verify'
3232
}
3333
post {
3434
always {

pom.xml

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
<unit-test-wlst-dir>${env.WLST_DIR}</unit-test-wlst-dir>
5252
</properties>
5353

54-
<modules>
55-
<module>core</module>
56-
<module>installer</module>
57-
</modules>
58-
5954
<dependencyManagement>
6055
<dependencies>
6156
<dependency>
@@ -73,6 +68,11 @@
7368
<artifactId>junit</artifactId>
7469
<version>4.12</version>
7570
</dependency>
71+
<dependency>
72+
<groupId>com.google.guava</groupId>
73+
<artifactId>guava</artifactId>
74+
<version>19.0</version>
75+
</dependency>
7676
</dependencies>
7777
</dependencyManagement>
7878

@@ -186,13 +186,22 @@
186186
</execution>
187187
</executions>
188188
</plugin>
189+
<plugin>
190+
<groupId>org.apache.maven.plugins</groupId>
191+
<artifactId>maven-resources-plugin</artifactId>
192+
<version>2.6</version>
193+
</plugin>
194+
<plugin>
195+
<groupId>org.apache.maven.plugins</groupId>
196+
<artifactId>maven-compiler-plugin</artifactId>
197+
<version>3.7.0</version>
198+
</plugin>
189199
</plugins>
190200
</pluginManagement>
191201
<plugins>
192202
<plugin>
193203
<groupId>org.apache.maven.plugins</groupId>
194204
<artifactId>maven-compiler-plugin</artifactId>
195-
<version>3.7.0</version>
196205
<configuration>
197206
<compilerArgs>
198207
<arg>-Xlint:all</arg>
@@ -219,14 +228,6 @@
219228
</execution>
220229
</executions>
221230
</plugin>
222-
<plugin>
223-
<groupId>org.apache.maven.plugins</groupId>
224-
<artifactId>maven-release-plugin</artifactId>
225-
<version>2.5.3</version>
226-
<configuration>
227-
<autoVersionSubmodules>true</autoVersionSubmodules>
228-
</configuration>
229-
</plugin>
230231
<plugin>
231232
<groupId>org.codehaus.mojo</groupId>
232233
<artifactId>flatten-maven-plugin</artifactId>
@@ -257,4 +258,28 @@
257258
</plugin>
258259
</plugins>
259260
</build>
261+
262+
<profiles>
263+
<profile>
264+
<id>dev</id>
265+
<activation>
266+
<activeByDefault>true</activeByDefault>
267+
</activation>
268+
<modules>
269+
<module>core</module>
270+
<module>installer</module>
271+
</modules>
272+
</profile>
273+
<profile>
274+
<id>system-test</id>
275+
<activation>
276+
<activeByDefault>false</activeByDefault>
277+
</activation>
278+
<modules>
279+
<module>core</module>
280+
<module>installer</module>
281+
<module>system-test</module>
282+
</modules>
283+
</profile>
284+
</profiles>
260285
</project>

system-test/pom.xml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
4+
The Universal Permissive License (UPL), Version 1.0
5+
-->
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
7+
<modelVersion>4.0.0</modelVersion>
8+
9+
<artifactId>weblogic-deploy-system-test</artifactId>
10+
<packaging>pom</packaging>
11+
12+
<parent>
13+
<artifactId>weblogic-deploy</artifactId>
14+
<groupId>com.oracle.weblogic.lifecycle</groupId>
15+
<version>1.4.1-SNAPSHOT</version>
16+
<relativePath>../pom.xml</relativePath>
17+
</parent>
18+
19+
<properties>
20+
<mw_home>${env.ORACLE_HOME}</mw_home>
21+
</properties>
22+
23+
<dependencies>
24+
<dependency>
25+
<groupId>junit</groupId>
26+
<artifactId>junit</artifactId>
27+
<scope>test</scope>
28+
</dependency>
29+
<dependency>
30+
<groupId>com.google.guava</groupId>
31+
<artifactId>guava</artifactId>
32+
<scope>test</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>commons-io</groupId>
36+
<artifactId>commons-io</artifactId>
37+
<version>2.6</version>
38+
<scope>test</scope>
39+
</dependency>
40+
</dependencies>
41+
42+
<build>
43+
<plugins>
44+
<plugin>
45+
<groupId>org.apache.maven.plugins</groupId>
46+
<artifactId>maven-compiler-plugin</artifactId>
47+
<executions>
48+
<execution>
49+
<id>test-compile</id>
50+
<phase>test-compile</phase>
51+
<goals>
52+
<goal>testCompile</goal>
53+
</goals>
54+
<configuration>
55+
</configuration>
56+
</execution>
57+
</executions>
58+
</plugin>
59+
<plugin>
60+
<groupId>org.apache.maven.plugins</groupId>
61+
<artifactId>maven-resources-plugin</artifactId>
62+
<executions>
63+
<execution>
64+
<id>test-resources</id>
65+
<phase>process-test-resources</phase>
66+
<goals>
67+
<goal>testResources</goal>
68+
</goals>
69+
</execution>
70+
</executions>
71+
</plugin>
72+
<plugin>
73+
<groupId>org.apache.maven.plugins</groupId>
74+
<artifactId>maven-failsafe-plugin</artifactId>
75+
<version>3.0.0-M3</version>
76+
<configuration>
77+
<encoding>UTF-8</encoding>
78+
<failIfNoTests>false</failIfNoTests>
79+
<argLine>
80+
-Xmx1024m -XX:MaxPermSize=256m
81+
</argLine>
82+
<systemProperties>
83+
<property>
84+
<name>wdtversion</name>
85+
<value>${project.version}</value>
86+
</property>
87+
<property>
88+
<name>MW_HOME</name>
89+
<value>${mw_home}</value>
90+
</property>
91+
</systemProperties>
92+
</configuration>
93+
<executions>
94+
<execution>
95+
<id>integration-tests</id>
96+
<goals>
97+
<goal>integration-test</goal>
98+
<goal>verify</goal>
99+
</goals>
100+
<phase>integration-test</phase>
101+
<configuration>
102+
<systemPropertyVariables>
103+
<java.util.logging.SimpleFormatter.format>%1$tm-%1$td-%1$tY %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
104+
</systemPropertyVariables>
105+
<trimStackTrace>false</trimStackTrace>
106+
</configuration>
107+
</execution>
108+
</executions>
109+
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-enforcer-plugin</artifactId>
113+
<executions>
114+
<execution>
115+
<id>enforce-build-environment</id>
116+
<goals>
117+
<goal>enforce</goal>
118+
</goals>
119+
<configuration>
120+
<rules>
121+
<requireProperty>
122+
<property>mw_home</property>
123+
<message>
124+
You must set the mw_home System property to point to the Oracle Home directory where WebLogic is installed. Or, set ORACLE_HOME environment variable.
125+
</message>
126+
</requireProperty>
127+
</rules>
128+
</configuration>
129+
</execution>
130+
</executions>
131+
</plugin>
132+
</plugins>
133+
</build>
134+
</project>

0 commit comments

Comments
 (0)