Skip to content

Commit

Permalink
Merge pull request #1753 from jjiwooLim/localEsa
Browse files Browse the repository at this point in the history
Add install-feature local esa test
  • Loading branch information
cherylking authored Nov 16, 2023
2 parents 8f784b8 + 05f86b1 commit f8008dc
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.openliberty.tools.it</groupId>
<artifactId>kernel-install-feature-tests</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>install-features-local-esa</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
</dependencies>

<properties>
<esaFile>/.m2/repository/io/openliberty/features/json-1.0/23.0.0.10/json-1.0-23.0.0.10.esa</esaFile>
</properties>

<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<esaFile>\.m2\repository\io\openliberty\features\json-1.0\23.0.0.10\json-1.0-23.0.0.10.esa</esaFile>
</properties>
</profile>
</profiles>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resource-one</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>

<configuration>
<outputDirectory>${user.home}/.m2/repository/io/openliberty/features/json-1.0/23.0.0.10</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
<includes>
<include>json-1.0*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<assemblyArtifact>
<groupId>${runtimeGroupId}</groupId>
<artifactId>${runtimeKernelId}</artifactId>
<!--Hard code to 23.0.0.10 to install 23.0.0.10 version of json-1.0-->
<version>23.0.0.10</version>
</assemblyArtifact>
</configuration>
<executions>
<execution>
<id>install-liberty-server</id>
<phase>compile</phase>
<goals>
<goal>install-server</goal>
</goals>
</execution>
<execution>
<id>create-server</id>
<phase>pre-integration-test</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
<execution>
<id>install-feature</id>
<phase>prepare-package</phase>
<goals>
<goal>install-feature</goal>
</goals>
<configuration>
<features>
<feature>${user.home}${esaFile}</feature>
<feature>jsp-2.3</feature>
</features>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<forkMode>once</forkMode>
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
<argLine>-enableassertions</argLine>
<workingDirectory>${project.build.directory}</workingDirectory>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package net.wasdev.wlp.test.feature.it;

import static junit.framework.Assert.*;
import org.junit.Test;
import org.junit.AfterClass;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import java.io.FilenameFilter;

public class InstallLocalEsaTest {

@Test
public void installLocalEsaTest() throws Exception {
try {
File jsonFile = new File("liberty/wlp/lib/features/com.ibm.websphere.appserver.json-1.0.mf");
File jspFile = new File("liberty/wlp/lib/features/com.ibm.websphere.appserver.jsp-2.3.mf");

assert jsonFile.exists() : "json-1.0 not installed";
assert jspFile.exists() : "jsp-2.3 not installed";

} catch (Exception e) {
throw new AssertionError ("Fail to install user feature.", e);
}
}

}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: BCPG v1.64

iQIzBAABCAAdFiEE5w5dbD8eRSyw9n3xvZ/Vvp5oygAFAmUpahEACgkQvZ/Vvp5o
ygCtDBAAxCeMDz+Xm5cStFEhkBsSX9AvVgwepQL2wGiUFSrk8deUZEeXBFFFwjVL
Wx/cR+cwaDrSegJnsMHyhSL/yO2OgRPemsqfU356mQjMw1rAczSLdzKmKj4dROPb
TP/4SRGCgPDnxU6ed2SSl9WBXkReLystEvswlEIgxUhFYanIU6RZzEjwZG7Iz3hz
bGBM1Nk/ZRuo/HfGA5iPmRlufzf2XKV31qrsVNyasjeW+jVlHT+WenihQHSoJeAL
xd/605he4oP9bwS2kr/6jub7RQjHwL5UVMQJX+eZvV+qr8cO9+8Z1hpZOaGogCES
H/Ly5iFrH/Z1Gv4q8v9I4wHBnZlv5HBOeDtC8E6VxGmknW4rpTEGiv0pvON/f7TT
X2eKNSIv+rUC4wPKr4UfoXa6qj5duvutDhfBFVtH6BIVSdcA3nLPsKn0FS4Ztk6F
JvgzA0aKqnkOaxfNPPg4kgV69WVhEYw+jk7XmxCoU2xzgaTX4ezQKrSOwF0tQ4sZ
ca5HpF+2gkOwn3pEzeF7UDlAQbcWxXCi2fLyPRBhbBEJwrdJkwzLiCmNrpMOc8jf
VJK3vAdqMwUOnGCoKNLYkegHM3YLFUNAqZhgYTu3I9ZXunlBIf4gNd8qTmEXyMYZ
eAkXG+p7uY6tYB4F2pTDmUS0KFwxECiRjpdlbrJeZGbSzrR+ZBI=
=MrkF
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
</activation>
<!-- Tests that should only run on Open Liberty are here -->
<modules>
<module>install-features-local-esa-it</module>
</modules>
</profile>
</profiles>
Expand Down

0 comments on commit f8008dc

Please sign in to comment.