From 934ca8b229bf51c466e6c604b2b6a9b471bc2601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 14 Jun 2023 11:41:23 +0300 Subject: [PATCH] Remove PrebuiltIndexChecker They are no longer generated and shipped as per https://github.com/eclipse-platform/.github/issues/130 --- .../org/eclipse/ua/tests/doc/AllTests.java | 3 +- .../linkchecker/PrebuiltIndexChecker.java | 73 ------------------- 2 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/PrebuiltIndexChecker.java diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/AllTests.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/AllTests.java index 32841305a..ef072d1e2 100644 --- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/AllTests.java +++ b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/AllTests.java @@ -15,7 +15,6 @@ import org.eclipse.ua.tests.doc.internal.linkchecker.ApiDocTest; import org.eclipse.ua.tests.doc.internal.linkchecker.LinkTest; -import org.eclipse.ua.tests.doc.internal.linkchecker.PrebuiltIndexChecker; import org.eclipse.ua.tests.doc.internal.linkchecker.TocLinkChecker; import org.junit.runner.RunWith; import org.junit.runners.Suite; @@ -24,6 +23,6 @@ * Tests all user assistance functionality (automated). */ @RunWith(Suite.class) -@Suite.SuiteClasses({ PrebuiltIndexChecker.class, TocLinkChecker.class, ApiDocTest.class, LinkTest.class }) +@Suite.SuiteClasses({ TocLinkChecker.class, ApiDocTest.class, LinkTest.class }) public class AllTests { } diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/PrebuiltIndexChecker.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/PrebuiltIndexChecker.java deleted file mode 100644 index 22be5ca54..000000000 --- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/PrebuiltIndexChecker.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 IBM Corporation and others. - * - * 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 - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.ua.tests.doc.internal.linkchecker; - -import static org.junit.Assert.assertNotNull; - -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.junit.Test; -import org.osgi.framework.Bundle; - -public class PrebuiltIndexChecker { - - private static final String PLATFORM_USER = "org.eclipse.platform.doc.user"; - private static final String PLATFORM_ISV = "org.eclipse.platform.doc.isv"; - private static final String PDE_USER = "org.eclipse.pde.doc.user"; - private static final String JDT_USER = "org.eclipse.jdt.doc.user"; - private static final String JDT_ISV = "org.eclipse.jdt.doc.isv"; - - @Test - public void testPlatformUserIndex() { - validateIndex(PLATFORM_USER, "index"); - } - - @Test - public void testPlatformIsvIndex() { - validateIndex(PLATFORM_ISV, "index"); - } - - @Test - public void testPdeUserIndex() { - validateIndex(PDE_USER, "index"); - } - - @Test - public void testJdtUserIndex() { - validateIndex(JDT_USER, "index"); - } - - @Test - public void testJdtIsvIndex() { - validateIndex(JDT_ISV, "index"); - } - - private void validateIndex(String plugin, String filepath) { - Bundle bundle = Platform.getBundle(plugin); - assertNotNull(bundle); - - String[] suffixes = { "", "/indexed_contributions", "/indexed_docs", "/indexed_dependencies" }; - for (String suffixe : suffixes) { - String fullPath = filepath + suffixe; - IPath path = new Path(fullPath); - URL url = FileLocator.find(bundle, path, null); - assertNotNull("could not open: " + fullPath, url); - } - } - -}