From 4ce57251bd12a83ddc7cf61fe625565a67a81f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Fri, 30 Jul 2021 23:40:30 +0200 Subject: [PATCH] Issue #23507 QuickLook tests removed - just the RestTest was moved under the admin module because it tests admin's endpoint - these tests will be rewritten soon in much better way - currently they were not executed --- nucleus/parent/pom.xml | 1 - .../glassfish/nucleus/admin}/RestTest.java | 2 +- nucleus/tests/pom.xml | 1 - nucleus/tests/quicklook/pom.xml | 92 ------------------- .../src/main/java/.gitkeep_empty_dir | 0 .../src/main/resources/.gitkeep_empty_dir | 0 .../nucleus/quicklook/ClusterTest.java | 90 ------------------ .../nucleus/quicklook/MiscCommandsTest.java | 44 --------- .../quicklook/NucleusStartStopTest.java | 19 ---- 9 files changed, 1 insertion(+), 248 deletions(-) rename nucleus/tests/{quicklook/src/test/java/org/glassfish/nucleus/quicklook => admin/src/test/java/org/glassfish/nucleus/admin}/RestTest.java (99%) delete mode 100644 nucleus/tests/quicklook/pom.xml delete mode 100644 nucleus/tests/quicklook/src/main/java/.gitkeep_empty_dir delete mode 100644 nucleus/tests/quicklook/src/main/resources/.gitkeep_empty_dir delete mode 100644 nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/ClusterTest.java delete mode 100644 nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/MiscCommandsTest.java delete mode 100644 nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/NucleusStartStopTest.java diff --git a/nucleus/parent/pom.xml b/nucleus/parent/pom.xml index f702734005f..0302821edf8 100644 --- a/nucleus/parent/pom.xml +++ b/nucleus/parent/pom.xml @@ -147,7 +147,6 @@ 2.10.0 - 7.4.0 nucleus false false diff --git a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/RestTest.java b/nucleus/tests/admin/src/test/java/org/glassfish/nucleus/admin/RestTest.java similarity index 99% rename from nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/RestTest.java rename to nucleus/tests/admin/src/test/java/org/glassfish/nucleus/admin/RestTest.java index 062af9da4eb..f73e62cac42 100644 --- a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/RestTest.java +++ b/nucleus/tests/admin/src/test/java/org/glassfish/nucleus/admin/RestTest.java @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.nucleus.quicklook; +package org.glassfish.nucleus.admin; import java.io.DataOutputStream; import java.io.IOException; diff --git a/nucleus/tests/pom.xml b/nucleus/tests/pom.xml index 25b610ceabc..a3a624d7665 100755 --- a/nucleus/tests/pom.xml +++ b/nucleus/tests/pom.xml @@ -34,7 +34,6 @@ admin - quicklook diff --git a/nucleus/tests/quicklook/pom.xml b/nucleus/tests/quicklook/pom.xml deleted file mode 100644 index 30092b78be7..00000000000 --- a/nucleus/tests/quicklook/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - 4.0.0 - - - org.glassfish.main.tests - nucleus-tests - 6.2.0-SNAPSHOT - - - nucleus-quicklook - - Nucleus Quicklook Tests - This pom describes how to run QuickLook tests on the Nucleus distribution - - - - org.glassfish.main.common - common-util - ${project.version} - test - - - org.glassfish.main.tests - utils-ng - ${project.version} - test - - - org.testng - testng - test - - - - - - - maven-surefire-plugin - 3.0.0-M4 - - - ${nucleaus.home} - - - - - - - diff --git a/nucleus/tests/quicklook/src/main/java/.gitkeep_empty_dir b/nucleus/tests/quicklook/src/main/java/.gitkeep_empty_dir deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/nucleus/tests/quicklook/src/main/resources/.gitkeep_empty_dir b/nucleus/tests/quicklook/src/main/resources/.gitkeep_empty_dir deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/ClusterTest.java b/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/ClusterTest.java deleted file mode 100644 index da464c33442..00000000000 --- a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/ClusterTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.nucleus.quicklook; - -import static org.glassfish.tests.utils.NucleusTestUtils.*; -import static org.testng.AssertJUnit.assertTrue; -import org.testng.annotations.Test; - -/** - * - * @author Tom Mueller - */ -@Test -public class ClusterTest { - - final String tn = "QLCluster"; - final String port1 = "18080"; - final String port2 = "28080"; - final String cname = "eec1"; - final String i1name = "eein1-with-a-very-very-very-long-name"; - final String i2name = "eein2"; - String i1url = "http://localhost:" + port1; - String i2url = "http://localhost:" + port2; - - public void createClusterTest() { - // create a cluster and two instances - assertTrue("create cluster", nadmin("create-cluster", cname)); - } - - @Test(dependsOnMethods = { "createClusterTest" }) - public void createInstancesTest() { - assertTrue("create instance1", nadmin("create-local-instance", - "--cluster", cname, "--systemproperties", - "HTTP_LISTENER_PORT=18080:HTTP_SSL_LISTENER_PORT=18181:IIOP_SSL_LISTENER_PORT=13800:" + - "IIOP_LISTENER_PORT=13700:JMX_SYSTEM_CONNECTOR_PORT=17676:IIOP_SSL_MUTUALAUTH_PORT=13801:" + - "JMS_PROVIDER_PORT=18686:ASADMIN_LISTENER_PORT=14848", i1name)); - assertTrue("create instance2", nadmin("create-local-instance", - "--cluster", cname, "--systemproperties", - "HTTP_LISTENER_PORT=28080:HTTP_SSL_LISTENER_PORT=28181:IIOP_SSL_LISTENER_PORT=23800:" + - "IIOP_LISTENER_PORT=23700:JMX_SYSTEM_CONNECTOR_PORT=27676:IIOP_SSL_MUTUALAUTH_PORT=23801:" + - "JMS_PROVIDER_PORT=28686:ASADMIN_LISTENER_PORT=24848", i2name)); - } - - @Test(dependsOnMethods = { "createInstancesTest" }) - public void startInstancesTest() { - // start the instances - assertTrue("start instance1", nadmin("start-local-instance", i1name)); - assertTrue("start instance2", nadmin("start-local-instance", i2name)); - } - - @Test(dependsOnMethods = { "startInstancesTest" }) - public void checkClusterTest() { - // check that the instances are there - assertTrue("list-instances", nadmin("list-instances")); - assertTrue("getindex1", matchString("GlassFish Server", getURL(i1url))); - assertTrue("getindex2", matchString("GlassFish Server", getURL(i2url))); - } - - @Test(dependsOnMethods = { "checkClusterTest" }) - public void stopInstancesTest() { - // stop and delete the instances and cluster - assertTrue("stop instance1", nadmin("stop-local-instance", "--kill", i1name)); - assertTrue("stop instance2", nadmin("stop-local-instance", "--kill", i2name)); - } - - @Test(dependsOnMethods = { "stopInstancesTest" }) - public void deleteInstancesTest() { - assertTrue("delete instance1", nadmin("delete-local-instance", i1name)); - assertTrue("delete instance2", nadmin("delete-local-instance", i2name)); - } - - @Test(dependsOnMethods = { "deleteInstancesTest" }) - public void deleteClusterTest() { - assertTrue("delete cluster", nadmin("delete-cluster", cname)); - } -} diff --git a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/MiscCommandsTest.java b/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/MiscCommandsTest.java deleted file mode 100644 index c3e7380c33a..00000000000 --- a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/MiscCommandsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.nucleus.quicklook; - -import static org.glassfish.tests.utils.NucleusTestUtils.nadmin; -import static org.testng.AssertJUnit.assertTrue; -import org.testng.annotations.Test; - -/** - * - * @author Tom Mueller - */ -@Test -public class MiscCommandsTest { - - public void uptime() { - assertTrue(nadmin("uptime")); - } - - public void version1() { - assertTrue(nadmin("version")); - } - - public void version2() { - assertTrue(nadmin("stop-domain")); - assertTrue(nadmin("version", "--local")); - assertTrue(nadmin("start-domain")); - } - -} diff --git a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/NucleusStartStopTest.java b/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/NucleusStartStopTest.java deleted file mode 100644 index 0ca745e507b..00000000000 --- a/nucleus/tests/quicklook/src/test/java/org/glassfish/nucleus/quicklook/NucleusStartStopTest.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.nucleus.quicklook; - -public class NucleusStartStopTest extends org.glassfish.tests.utils.NucleusStartStopTest { }