Skip to content

Commit 3c6bcad

Browse files
SajeerSajeer
authored andcommitted
Updated ci.common cloning references and also added product info based tests
1 parent abe1405 commit 3c6bcad

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ jobs:
108108
- name: Checkout ci.common
109109
uses: actions/checkout@v3
110110
with:
111-
repository: OpenLiberty/ci.common
111+
repository: sajeerzeji/ci.common
112112
path: ci.common
113+
reference: GH502-Incorporate_Toolchains_to_ProductInfo_called_from_ci_common
113114
- name: Checkout ci.ant
114115
uses: actions/checkout@v3
115116
with:
@@ -226,7 +227,7 @@ jobs:
226227
- name: Clone ci.ant and ci.common repos to github.workspace
227228
run: |
228229
echo ${{github.workspace}}
229-
git clone https://github.com/OpenLiberty/ci.common.git ${{github.workspace}}/ci.common
230+
git clone https://github.com/sajeerzeji/ci.common.git --branch reference: GH502-Incorporate_Toolchains_to_ProductInfo_called_from_ci_common --single-branch ${{github.workspace}}/ci.common
230231
git clone https://github.com/OpenLiberty/ci.ant.git ${{github.workspace}}/ci.ant
231232
- name: Set up Maven
232233
uses: stCarolas/setup-maven@v4.5

liberty-maven-plugin/src/it/toolchain-install-feature-it/src/test/java/net/wasdev/wlp/maven/test/app/ToolchainInstallFeatureTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
public class ToolchainInstallFeatureTest {
1414

1515
private static final String TOOLCHAIN_CONFIGURED_MESSAGE = "CWWKM4101I: The install-feature goal is using the configured toolchain JDK";
16+
private static final String PRODUCT_VALIDATION_TOOLCHAIN_MESSAGE = "Product validation is using toolchain JAVA_HOME:";
17+
private static final String PRODUCT_VALIDATION_SUCCESS_MESSAGE = "Product validation completed successfully.";
1618

1719
@Test
1820
public void testToolchainUsedForInstallFeature() throws Exception {
@@ -24,6 +26,12 @@ public void testToolchainUsedForInstallFeature() throws Exception {
2426

2527
assertTrue("Build log should contain toolchain configured message for install-feature goal",
2628
logContent.contains(TOOLCHAIN_CONFIGURED_MESSAGE));
29+
30+
assertTrue("Product validation should use toolchain JAVA_HOME",
31+
logContent.contains(PRODUCT_VALIDATION_TOOLCHAIN_MESSAGE));
32+
33+
assertTrue("Product validation should complete successfully",
34+
logContent.contains(PRODUCT_VALIDATION_SUCCESS_MESSAGE));
2735
}
2836

2937
private String readFile(File file) throws IOException {

0 commit comments

Comments
 (0)