diff --git a/dev/com.ibm.ws.install.featureUtility_fat/build.gradle b/dev/com.ibm.ws.install.featureUtility_fat/build.gradle index 50960b680f1b..785589751279 100644 --- a/dev/com.ibm.ws.install.featureUtility_fat/build.gradle +++ b/dev/com.ibm.ws.install.featureUtility_fat/build.gradle @@ -1,4 +1,4 @@ -/* Copyright (c) 2021, 2023 IBM Corporation and others. +/* Copyright (c) 2021, 2024 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -18,7 +18,7 @@ addRequiredLibraries { dependencies { usrFeatures 'test.featureUtility_fat:userFeature:1.0@zip' - features 'test.featureUtility_fat:Archive:1.0@zip' + features 'test.featureUtility_fat:Archive:2.0@zip' requiredLibs project(':com.ibm.ws.org.slf4j.api'), project(':com.ibm.ws.org.slf4j.simple') } diff --git a/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FATSuite.java b/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FATSuite.java index 2756dc173d20..3acac5a98a9a 100644 --- a/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FATSuite.java +++ b/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FATSuite.java @@ -39,7 +39,7 @@ public class FATSuite extends TestContainerSuite { public static void beforeSuite() throws Exception { FeatureUtilityToolTest.setupEnv(); FeatureUtilityToolTest.constructLocalMavenRepo(Paths.get("publish/repo/userFeature/userFeature-1.0.zip")); - FeatureUtilityToolTest.constructLocalMavenRepo(Paths.get("publish/repo/archive/Archive-1.0.zip")); + FeatureUtilityToolTest.constructLocalMavenRepo(Paths.get("publish/repo/archive/Archive-2.0.zip")); } @AfterClass diff --git a/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FeatureUtilityToolTest.java b/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FeatureUtilityToolTest.java index 9dfb635cdca7..c94764b04ab9 100644 --- a/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FeatureUtilityToolTest.java +++ b/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/FeatureUtilityToolTest.java @@ -48,7 +48,7 @@ public abstract class FeatureUtilityToolTest { private static final Class c = FeatureUtilityToolTest.class; - protected static String libertyVersion = "23.0.0.2"; + protected static String libertyVersion = "24.0.0.8"; // ${buildDir}/publish/repo protected static String mavenLocalRepo = Paths.get("publish/repo/").toAbsolutePath().toString(); public static LibertyServer server; diff --git a/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/InstallServerTest.java b/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/InstallServerTest.java index 9ebe5b387256..435e004e692b 100644 --- a/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/InstallServerTest.java +++ b/dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/InstallServerTest.java @@ -162,7 +162,7 @@ public void testInvalidMultiVersionFeatures() throws Exception { * * @throws Exception */ - @Ignore + @Test public void testVersionlessWithBadPlatformFeatures() throws Exception { final String METHOD_NAME = "testVersionlessWithBadPlatformFeatures"; @@ -183,7 +183,7 @@ public void testVersionlessWithBadPlatformFeatures() throws Exception { * * @throws Exception */ - @Ignore + @Test public void testVersionlessWithNoPlatformFeatures() throws Exception { final String METHOD_NAME = "testVersionlessWithNoPlatformFeatures"; @@ -198,6 +198,28 @@ public void testVersionlessWithNoPlatformFeatures() throws Exception { Log.exiting(c, METHOD_NAME); } + /** + * Test the install of versionless with platform name. install servlet-6.0 feature + * + * @throws Exception + */ + + @Test + public void testVersionlessWithPlatformFeatures() throws Exception { + final String METHOD_NAME = "testVersionlessWithPlatformFeatures"; + Log.entering(c, METHOD_NAME); + + copyFileToMinifiedRoot("usr/servers/serverX", "publish/tmp/versionlessWithPlatform/server.xml"); + + String[] param1s = { "installServerFeatures", "serverX", "--verbose" }; + String[] filesList = { "/lib/features/com.ibm.websphere.appserver.servlet-6.0.mf" }; + + ProgramOutput po = runFeatureUtility(METHOD_NAME, param1s); + + checkCommandOutput(po, 0, null, filesList); //Should have servlet-6.0 + Log.exiting(c, METHOD_NAME); + } + /** * Install an user feature with the "--featuresBom" parameters */ diff --git a/dev/com.ibm.ws.install.featureUtility_fat/publish/tmp/versionlessWithPlatform/server.xml b/dev/com.ibm.ws.install.featureUtility_fat/publish/tmp/versionlessWithPlatform/server.xml new file mode 100644 index 000000000000..2f703917b5cf --- /dev/null +++ b/dev/com.ibm.ws.install.featureUtility_fat/publish/tmp/versionlessWithPlatform/server.xml @@ -0,0 +1,10 @@ + + + + + + jakartaee-10.0 + servlet + + +