-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #859 from jjiwooLim/localesa
InstallFeature - add local esa install test
- Loading branch information
Showing
5 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/test/groovy/io/openliberty/tools/gradle/InstallFeature_localEsa_Test.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package io.openliberty.tools.gradle | ||
|
||
import static org.junit.Assert.* | ||
|
||
import org.junit.BeforeClass | ||
import org.junit.After | ||
import org.junit.AfterClass | ||
import org.junit.FixMethodOrder | ||
import org.junit.Test | ||
import org.junit.runners.MethodSorters | ||
import io.openliberty.tools.common.plugins.util.PluginExecutionException | ||
import org.gradle.testkit.runner.BuildResult | ||
|
||
class InstallFeature_localEsa_Test extends AbstractIntegrationTest{ | ||
static File resourceDir = new File("build/resources/test/local-esa-test") | ||
static File buildDir = new File(integTestDir, "/LocalEsaTest") | ||
static File jsonPath = new File(buildDir, "io/openliberty/features/json-1.0/23.0.0.10/json-1.0-23.0.0.10.esa") | ||
def featureFile = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.json-1.0.mf") | ||
|
||
|
||
@BeforeClass | ||
public static void setup() { | ||
createTestProject(buildDir, resourceDir, "build.gradle") | ||
} | ||
|
||
@Test | ||
public void test_localEsa() { | ||
try { | ||
def jsonFile = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.json-1.0.mf") | ||
def jspFile = new File(buildDir, "build/wlp/lib/features/com.ibm.websphere.appserver.jsp-2.3.mf") | ||
runTasks(buildDir, 'installFeature') | ||
|
||
assert jsonFile.exists() : "json-1.0 cannot be generated" | ||
assert jspFile.exists() : "jsp-2.3 cannot be generated" | ||
|
||
} catch (Exception e) { | ||
throw new AssertionError ("test should pass", e) | ||
} | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apply plugin: 'liberty' | ||
|
||
buildscript { | ||
repositories{ | ||
mavenLocal() | ||
mavenCentral() | ||
maven { | ||
name = 'Sonatype Nexus Snapshots' | ||
url = 'https://oss.sonatype.org/content/repositories/snapshots/' | ||
} | ||
} | ||
dependencies { | ||
classpath "io.openliberty.tools:liberty-gradle-plugin:$lgpVersion" | ||
} | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
def featureName = new File(project.projectDir, '/json-1.0-23.0.0.10.esa').toString() | ||
liberty { | ||
runtime = ['group': 'io.openliberty','name':'openliberty-kernel','version':runtimeVersion] | ||
server { | ||
features { | ||
name = [featureName, 'jsp-2.3'] | ||
} | ||
} | ||
} |
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
src/test/resources/local-esa-test/json-1.0-23.0.0.10.esa.asc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//Empty |