Skip to content

Commit f8008dc

Browse files
authored
Merge pull request #1753 from jjiwooLim/localEsa
Add install-feature local esa test
2 parents 8f784b8 + 05f86b1 commit f8008dc

File tree

5 files changed

+207
-0
lines changed

5 files changed

+207
-0
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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">
3+
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>io.openliberty.tools.it</groupId>
8+
<artifactId>kernel-install-feature-tests</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>install-features-local-esa</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>junit</groupId>
18+
<artifactId>junit</artifactId>
19+
<version>4.13.2</version>
20+
</dependency>
21+
</dependencies>
22+
23+
<properties>
24+
<esaFile>/.m2/repository/io/openliberty/features/json-1.0/23.0.0.10/json-1.0-23.0.0.10.esa</esaFile>
25+
</properties>
26+
27+
<profiles>
28+
<profile>
29+
<id>windows</id>
30+
<activation>
31+
<os>
32+
<family>Windows</family>
33+
</os>
34+
</activation>
35+
<properties>
36+
<esaFile>\.m2\repository\io\openliberty\features\json-1.0\23.0.0.10\json-1.0-23.0.0.10.esa</esaFile>
37+
</properties>
38+
</profile>
39+
</profiles>
40+
41+
<build>
42+
<pluginManagement>
43+
<plugins>
44+
<plugin>
45+
<groupId>org.apache.maven.plugins</groupId>
46+
<artifactId>maven-failsafe-plugin</artifactId>
47+
<version>3.1.2</version>
48+
</plugin>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-surefire-plugin</artifactId>
52+
<version>3.1.2</version>
53+
</plugin>
54+
</plugins>
55+
</pluginManagement>
56+
<plugins>
57+
<plugin>
58+
<artifactId>maven-resources-plugin</artifactId>
59+
<version>3.3.1</version>
60+
<executions>
61+
<execution>
62+
<id>copy-resource-one</id>
63+
<phase>process-test-resources</phase>
64+
<goals>
65+
<goal>copy-resources</goal>
66+
</goals>
67+
68+
<configuration>
69+
<outputDirectory>${user.home}/.m2/repository/io/openliberty/features/json-1.0/23.0.0.10</outputDirectory>
70+
<resources>
71+
<resource>
72+
<directory>src/test/resources</directory>
73+
<includes>
74+
<include>json-1.0*</include>
75+
</includes>
76+
</resource>
77+
</resources>
78+
</configuration>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
<plugin>
83+
<groupId>io.openliberty.tools</groupId>
84+
<artifactId>liberty-maven-plugin</artifactId>
85+
<version>@pom.version@</version>
86+
<configuration>
87+
<assemblyArtifact>
88+
<groupId>${runtimeGroupId}</groupId>
89+
<artifactId>${runtimeKernelId}</artifactId>
90+
<!--Hard code to 23.0.0.10 to install 23.0.0.10 version of json-1.0-->
91+
<version>23.0.0.10</version>
92+
</assemblyArtifact>
93+
</configuration>
94+
<executions>
95+
<execution>
96+
<id>install-liberty-server</id>
97+
<phase>compile</phase>
98+
<goals>
99+
<goal>install-server</goal>
100+
</goals>
101+
</execution>
102+
<execution>
103+
<id>create-server</id>
104+
<phase>pre-integration-test</phase>
105+
<goals>
106+
<goal>create</goal>
107+
</goals>
108+
</execution>
109+
<execution>
110+
<id>install-feature</id>
111+
<phase>prepare-package</phase>
112+
<goals>
113+
<goal>install-feature</goal>
114+
</goals>
115+
<configuration>
116+
<features>
117+
<feature>${user.home}${esaFile}</feature>
118+
<feature>jsp-2.3</feature>
119+
</features>
120+
</configuration>
121+
</execution>
122+
</executions>
123+
</plugin>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-failsafe-plugin</artifactId>
127+
<configuration>
128+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
129+
<forkMode>once</forkMode>
130+
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
131+
<argLine>-enableassertions</argLine>
132+
<workingDirectory>${project.build.directory}</workingDirectory>
133+
<includes>
134+
<include>**/*Test.java</include>
135+
</includes>
136+
</configuration>
137+
<executions>
138+
<execution>
139+
<id>integration-test</id>
140+
<goals>
141+
<goal>integration-test</goal>
142+
</goals>
143+
</execution>
144+
<execution>
145+
<id>verify</id>
146+
<phase>verify</phase>
147+
<goals>
148+
<goal>verify</goal>
149+
</goals>
150+
</execution>
151+
</executions>
152+
</plugin>
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-surefire-plugin</artifactId>
156+
<configuration>
157+
<skip>true</skip>
158+
</configuration>
159+
</plugin>
160+
</plugins>
161+
</build>
162+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package net.wasdev.wlp.test.feature.it;
2+
3+
import static junit.framework.Assert.*;
4+
import org.junit.Test;
5+
import org.junit.AfterClass;
6+
import java.io.File;
7+
import java.io.IOException;
8+
import org.apache.commons.io.FileUtils;
9+
import java.io.FilenameFilter;
10+
11+
public class InstallLocalEsaTest {
12+
13+
@Test
14+
public void installLocalEsaTest() throws Exception {
15+
try {
16+
File jsonFile = new File("liberty/wlp/lib/features/com.ibm.websphere.appserver.json-1.0.mf");
17+
File jspFile = new File("liberty/wlp/lib/features/com.ibm.websphere.appserver.jsp-2.3.mf");
18+
19+
assert jsonFile.exists() : "json-1.0 not installed";
20+
assert jspFile.exists() : "jsp-2.3 not installed";
21+
22+
} catch (Exception e) {
23+
throw new AssertionError ("Fail to install user feature.", e);
24+
}
25+
}
26+
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-----BEGIN PGP SIGNATURE-----
2+
Version: BCPG v1.64
3+
4+
iQIzBAABCAAdFiEE5w5dbD8eRSyw9n3xvZ/Vvp5oygAFAmUpahEACgkQvZ/Vvp5o
5+
ygCtDBAAxCeMDz+Xm5cStFEhkBsSX9AvVgwepQL2wGiUFSrk8deUZEeXBFFFwjVL
6+
Wx/cR+cwaDrSegJnsMHyhSL/yO2OgRPemsqfU356mQjMw1rAczSLdzKmKj4dROPb
7+
TP/4SRGCgPDnxU6ed2SSl9WBXkReLystEvswlEIgxUhFYanIU6RZzEjwZG7Iz3hz
8+
bGBM1Nk/ZRuo/HfGA5iPmRlufzf2XKV31qrsVNyasjeW+jVlHT+WenihQHSoJeAL
9+
xd/605he4oP9bwS2kr/6jub7RQjHwL5UVMQJX+eZvV+qr8cO9+8Z1hpZOaGogCES
10+
H/Ly5iFrH/Z1Gv4q8v9I4wHBnZlv5HBOeDtC8E6VxGmknW4rpTEGiv0pvON/f7TT
11+
X2eKNSIv+rUC4wPKr4UfoXa6qj5duvutDhfBFVtH6BIVSdcA3nLPsKn0FS4Ztk6F
12+
JvgzA0aKqnkOaxfNPPg4kgV69WVhEYw+jk7XmxCoU2xzgaTX4ezQKrSOwF0tQ4sZ
13+
ca5HpF+2gkOwn3pEzeF7UDlAQbcWxXCi2fLyPRBhbBEJwrdJkwzLiCmNrpMOc8jf
14+
VJK3vAdqMwUOnGCoKNLYkegHM3YLFUNAqZhgYTu3I9ZXunlBIf4gNd8qTmEXyMYZ
15+
eAkXG+p7uY6tYB4F2pTDmUS0KFwxECiRjpdlbrJeZGbSzrR+ZBI=
16+
=MrkF
17+
-----END PGP SIGNATURE-----

liberty-maven-plugin/src/it/kernel-install-feature-test/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
</activation>
7676
<!-- Tests that should only run on Open Liberty are here -->
7777
<modules>
78+
<module>install-features-local-esa-it</module>
7879
</modules>
7980
</profile>
8081
</profiles>

0 commit comments

Comments
 (0)