From 20de3d6689ed78e6bb449e6b586eafc0d01aa9a2 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Mon, 9 Dec 2024 12:00:49 +0100 Subject: [PATCH] chore: disable service tests (#948) * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet * chore: disable services tests Signed-off-by: Stephane Bouchet * chore: disable services tests Signed-off-by: Stephane Bouchet * chore: disable services tests Signed-off-by: Stephane Bouchet * chore: disable services tests Signed-off-by: Stephane Bouchet * chore: disable services tests Signed-off-by: Stephane Bouchet * chore: disable services tests Signed-off-by: Stephane Bouchet --------- Signed-off-by: Stephane Bouchet --- .github/workflows/ci.yml | 30 ++++++------ .../cluster_integration_ui_tests.yml | 2 +- .github/workflows/conventionalCheck.yml | 5 ++ .github/workflows/nightly.yml | 3 +- .github/workflows/validate_IJ_versions.yml | 2 +- build.gradle.kts | 46 ++++++++++++------- gradle.properties | 14 +++--- gradle/libs.versions.toml | 3 +- .../intellij/openshift/utils/helm/Charts.java | 7 ++- .../openshift/utils/helm/HelmCliRepoTest.java | 8 ++-- .../openshift/utils/helm/HelmCliTest.java | 1 + .../utils/odo/OdoCliCatalogTest.java | 8 ++++ .../utils/odo/OdoCliComponentTest.java | 2 + .../utils/odo/OdoCliProjectTest.java | 8 ++++ .../utils/odo/OdoCliRegistryTest.java | 20 +++++--- .../utils/odo/OdoCliServiceTest.java | 13 ++++-- .../openshift/utils/odo/OdoCliTest.java | 17 ++++--- 17 files changed, 126 insertions(+), 63 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7e7007bf..34d003f9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: pull_request: branches: [ main ] +permissions: + pull-requests: write + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true @@ -75,19 +78,20 @@ jobs: validate-wrappers: true - uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde #v1.10.0 name: Start cluster - - name: Setup cluster - run: | - curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0 - kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml - kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml - nb=0 - echo -n "Waiting for operator to show up " - while [ "$nb" != "2" ] - do - echo -n "." - sleep 1 - nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l` - done + # service setup disabled along with service test because service binding operator is deprecated, and postgres service isn't available anymore + # - name: Setup cluster + # run: | + # curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0 + # kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml + # kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml + # nb=0 + # echo -n "Waiting for operator to show up " + # while [ "$nb" != "2" ] + # do + # echo -n "." + # sleep 1 + # nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l` + # done - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Play integration tests diff --git a/.github/workflows/cluster_integration_ui_tests.yml b/.github/workflows/cluster_integration_ui_tests.yml index 693911cf0..07b82b62b 100644 --- a/.github/workflows/cluster_integration_ui_tests.yml +++ b/.github/workflows/cluster_integration_ui_tests.yml @@ -23,7 +23,7 @@ jobs: validate-wrappers: true - uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde #v1.10.0 name: Start cluster - # service setup disabled along with service test + # service setup disabled along with service test because service binding operator is deprecated, and postgres service isn't available anymore # - name: Setup cluster # run: | # curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0 diff --git a/.github/workflows/conventionalCheck.yml b/.github/workflows/conventionalCheck.yml index 8236b1a00..dfafb46be 100644 --- a/.github/workflows/conventionalCheck.yml +++ b/.github/workflows/conventionalCheck.yml @@ -6,9 +6,14 @@ on: - opened - edited - synchronize + - reopened + +permissions: + pull-requests: read jobs: main: + name: Validate PR title runs-on: ubuntu-latest steps: - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 #v5.5.3 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e7208ab72..89fa56d95 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -39,8 +39,9 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - distribution: temurin java-version: 17 + distribution: 'temurin' + cache: 'gradle' # Setup Gradle - name: Setup Gradle diff --git a/.github/workflows/validate_IJ_versions.yml b/.github/workflows/validate_IJ_versions.yml index f053dd4de..f66dc66e0 100644 --- a/.github/workflows/validate_IJ_versions.yml +++ b/.github/workflows/validate_IJ_versions.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - IJ: [ 2022.3, 2023.1, 2023.2, 2023.3, 2024.1, 2024.2 ] + IJ: [ 2022.3, 2023.1, 2023.2, 2023.3, 2024.1, 2024.2, 2024.3 ] steps: - name: Checkout Code diff --git a/build.gradle.kts b/build.gradle.kts index 86dcb0054..47fc1ed9a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,13 @@ +import org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.gradle.api.tasks.testing.logging.TestLogEvent import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType import org.jetbrains.intellij.platform.gradle.TestFrameworkType +import org.jetbrains.intellij.platform.gradle.models.ProductRelease plugins { + id("idea") id("java") // Java support alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin - alias(libs.plugins.testLogger) // Nice test logs id("jacoco") // Code coverage alias(libs.plugins.sonarqube) // SonarQube } @@ -127,6 +130,13 @@ tasks { test { systemProperty("com.redhat.devtools.intellij.telemetry.mode", "disabled") jvmArgs("-Djava.awt.headless=true") + useJUnit() + testLogging { + events(TestLogEvent.FAILED) + exceptionFormat = TestExceptionFormat.FULL + showStackTraces = true + showStandardStreams = false + } } withType { @@ -165,6 +175,11 @@ tasks { mainClass.set("org.jboss.tools.intellij.openshift.ui.sandbox.SandboxRegistrationServerMock") } + printProductsReleases { + channels = listOf(ProductRelease.Channel.EAP) + types = listOf(IntelliJPlatformType.IntellijIdeaCommunity) + untilBuild = provider { null } + } } sourceSets { @@ -191,22 +206,22 @@ val integrationTest by intellijPlatformTesting.testIde.registering { group = "verification" testClassesDirs = sourceSets["it"].output.classesDirs classpath = sourceSets["it"].runtimeClasspath - testlogger { - showStandardStreams = true - showPassedStandardStreams = false - showSkippedStandardStreams = false - showFailedStandardStreams = true - showFullStackTraces = true + testLogging { + events(TestLogEvent.FAILED) + exceptionFormat = TestExceptionFormat.FULL + showStackTraces = true + showStandardStreams = false } jvmArgs("-Djava.awt.headless=true") + useJUnitPlatform { + includeEngines("junit-vintage") + excludeEngines("junit-jupiter") + } shouldRunAfter(tasks["test"]) } - plugins { - robotServerPlugin() - } - dependencies { + testRuntimeOnly(libs.junit.vintage.engine) testImplementation(libs.junit.platform.launcher) testImplementation(libs.junit.platform.suite) testImplementation(libs.junit.jupiter) @@ -228,12 +243,11 @@ val integrationUITest by intellijPlatformTesting.testIde.registering { group = "verification" testClassesDirs = sourceSets["it"].output.classesDirs classpath = sourceSets["it"].runtimeClasspath - testlogger { + testLogging { + events(TestLogEvent.FAILED) + exceptionFormat = TestExceptionFormat.FULL + showStackTraces = true showStandardStreams = true - showPassedStandardStreams = false - showSkippedStandardStreams = false - showFailedStandardStreams = true - showFullStackTraces = true } jvmArgs("-Djava.awt.headless=false") // use of clipboard in AboutPublicTest, set to false val includes = if (System.getenv("CLUSTER_ALREADY_LOGGED_IN") == null) "**/PublicTestsSuite.class" else "**/ClusterTestsSuite.class" diff --git a/gradle.properties b/gradle.properties index 131b41c6a..82f9d9307 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,22 +7,22 @@ jetBrainsChannel=stable platformVersion=2024.3 # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 8.5 +gradleVersion=8.5 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html -platformBundledPlugins = com.intellij.java, org.jetbrains.plugins.yaml, org.jetbrains.plugins.terminal -platformPlugins = com.redhat.devtools.intellij.telemetry:1.2.1.62, com.redhat.devtools.intellij.kubernetes:1.4.0.4 +platformBundledPlugins=com.intellij.java, org.jetbrains.plugins.yaml, org.jetbrains.plugins.terminal +platformPlugins=com.redhat.devtools.intellij.telemetry:1.2.1.62, com.redhat.devtools.intellij.kubernetes:1.4.0.4 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -pluginSinceBuild = 223 +pluginSinceBuild=223 # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib -kotlin.stdlib.default.dependency = false +kotlin.stdlib.default.dependency=false # Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html -org.gradle.configuration-cache = true +org.gradle.configuration-cache=true # Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html -org.gradle.caching = true +org.gradle.caching=true org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx4g -Xms1g \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8ae718a91..7cc53a6b6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,6 @@ annotations = "24.0.0" # plugins gradleIntelliJPlugin = "2.0.1" -testlogger = "4.0.0" sonarqube = "5.1.0.4882" [libraries] @@ -37,11 +36,11 @@ junit-platform-suite = { group = "org.junit.platform", name = "junit-platform-su junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" } junit-jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit-jupiter" } junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" } +junit-vintage-engine = { group = "org.junit.vintage", name = "junit-vintage-engine", version.ref = "junit-jupiter" } devtools-common-ui-test = { group = "com.redhat.devtools.intellij", name = "intellij-common-ui-test-library", version.ref = "devtools-common-ui-test" } awaitility = { group = "org.awaitility", name = "awaitility", version.ref = "awaitility" } annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" } [plugins] gradleIntelliJPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "gradleIntelliJPlugin" } -testLogger = { id = "com.adarshr.test-logger", version.ref = "testlogger" } sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" } \ No newline at end of file diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/Charts.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/Charts.java index cd466fdbc..4c40bd347 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/Charts.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/Charts.java @@ -22,8 +22,7 @@ public class Charts { public static final String CHART_KUBEROS = "kuberos"; public static final String CHART_SYSDIG = "sysdig"; - public static final Pair REPOSITORY_STABLE = new Pair("stable", "https://charts.helm.sh/stable"); - public static final Pair REPOSITORY_OPENSHIFT = new Pair("openshift", "https://charts.openshift.io/"); + public static final Pair REPOSITORY_STABLE = new Pair<>("stable", "https://charts.helm.sh/stable"); public static Chart get(String name, Helm helm) throws Exception { Optional found = helm.search(name).stream().findFirst(); @@ -35,4 +34,8 @@ public static void addRepository(Pair pair, Helm helm) throws IO helm.addRepo(pair.first, pair.second, null); } + public static void removeRepository(Pair pair, Helm helm) throws IOException { + helm.removeRepos(pair.first); + } + } diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliRepoTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliRepoTest.java index e9e9087f1..569f814d4 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliRepoTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliRepoTest.java @@ -14,8 +14,6 @@ import java.io.IOException; import java.util.List; -import static org.assertj.core.api.Assertions.assertThat; - public class HelmCliRepoTest extends HelmCliTest { public void testListRepos_should_list_repo_that_was_added() throws IOException { @@ -47,14 +45,16 @@ public void testRemoveRepos_should_remove_repo_that_was_added() throws IOExcepti List helmRepositoryNames = helm.listRepos().stream() .map(HelmRepository::getName) .toList(); - assertThat(helmRepositoryNames).contains(name, name2); + assertTrue(helmRepositoryNames.contains(name)); + assertTrue(helmRepositoryNames.contains(name2)); // when helm.removeRepos(name, name2); // then helmRepositoryNames = helm.listRepos().stream() .map(HelmRepository::getName) .toList(); - assertThat(helmRepositoryNames).doesNotContain(name, name2); + assertFalse(helmRepositoryNames.contains(name)); + assertFalse(helmRepositoryNames.contains(name2)); } finally { silentlyRemoveRepos(name, name2); } diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliTest.java index f3d87cbef..732c4a67e 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliTest.java @@ -45,6 +45,7 @@ protected void tearDown() throws Exception { if (tool != null) { tool.get().deleteProject(projectName); } + Charts.removeRepository(Charts.REPOSITORY_STABLE, helm); super.tearDown(); } diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliCatalogTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliCatalogTest.java index 08ebd47d7..50b224c66 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliCatalogTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliCatalogTest.java @@ -10,6 +10,9 @@ ******************************************************************************/ package org.jboss.tools.intellij.openshift.utils.odo; +import org.junit.Ignore; +import org.junit.Test; + import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutionException; @@ -19,6 +22,7 @@ public class OdoCliCatalogTest extends OdoCliTest { + @Test public void testCheckGetComponentTypes() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); try { @@ -30,6 +34,8 @@ public void testCheckGetComponentTypes() throws IOException, ExecutionException, } } + @Test + @Ignore("Service operator is deprecated") public void testCheckGetServiceTemplates() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); try { @@ -42,6 +48,8 @@ public void testCheckGetServiceTemplates() throws IOException, ExecutionExceptio } } + @Test + @Ignore("Service operator is deprecated") public void testCheckMultiPlansServiceTemplates() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); try { diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliComponentTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliComponentTest.java index 0f353634b..b1555aee5 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliComponentTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliComponentTest.java @@ -18,6 +18,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -131,6 +132,7 @@ public void checkCreateAndDeleteComponent() throws IOException, ExecutionExcepti } @Test + @Ignore("Service operator is deprecated") public void checkCreateComponentAndLinkService() throws IOException, ExecutionException, InterruptedException { createComponent(project, component, projectPath); ServiceTemplate serviceTemplate = getServiceTemplate(); diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliProjectTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliProjectTest.java index 8f8ced7b8..d9855f2ea 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliProjectTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliProjectTest.java @@ -10,27 +10,35 @@ ******************************************************************************/ package org.jboss.tools.intellij.openshift.utils.odo; +import org.junit.Test; + import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutionException; public class OdoCliProjectTest extends OdoCliTest { + @Test public void testCheckCreateProject() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); try { + List projects = odo.getNamespaces(); + assertFalse(projects.isEmpty()); createProject(project); + assertEquals(projects.size()+1, odo.getNamespaces().size()); } finally { odo.deleteProject(project); } } + @Test public void testCheckListProjects() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); try { createProject(project); List projects = odo.getNamespaces(); assertFalse(projects.isEmpty()); + assertTrue(projects.contains(project)); } finally { odo.deleteProject(project); } diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliRegistryTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliRegistryTest.java index b243701be..8ad70fc95 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliRegistryTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliRegistryTest.java @@ -10,32 +10,40 @@ ******************************************************************************/ package org.jboss.tools.intellij.openshift.utils.odo; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + import java.io.IOException; import java.util.List; public class OdoCliRegistryTest extends OdoCliTest { - @Override - protected void setUp() throws Exception { - super.setUp(); + @Before + public void initTestEnv() throws IOException { odo.createDevfileRegistry(REGISTRY_NAME, REGISTRY_URL, null); } - @Override - protected void tearDown() throws Exception { + @After + public void cleanupTestEnv() throws IOException { odo.deleteDevfileRegistry(REGISTRY_NAME); - super.tearDown(); } + @Test public void testCheckCreateRegistry() throws IOException { String registryName = REGISTRY_PREFIX + random.nextInt(); try { + List registries = odo.listDevfileRegistries(); + assertFalse(registries.isEmpty()); odo.createDevfileRegistry(registryName, "https://registry.devfile.io", null); + assertEquals(registries.size() + 1, odo.listDevfileRegistries().size()); + assertTrue(odo.listDevfileRegistries().stream().anyMatch(reg -> reg.getName().equals(registryName))); } finally { odo.deleteDevfileRegistry(registryName); } } + @Test public void testCheckListRegistries() throws IOException { List registries = odo.listDevfileRegistries(); assertFalse(registries.isEmpty()); diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliServiceTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliServiceTest.java index a56e1cfba..4ee8415ac 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliServiceTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliServiceTest.java @@ -10,6 +10,10 @@ ******************************************************************************/ package org.jboss.tools.intellij.openshift.utils.odo; +import org.junit.After; +import org.junit.Ignore; +import org.junit.Test; + import java.io.File; import java.io.IOException; import java.util.List; @@ -19,12 +23,13 @@ public class OdoCliServiceTest extends OdoCliTest { private final String projectPath = new File("src/it/projects/springboot-rest").getAbsolutePath(); - @Override - protected void tearDown() throws Exception { + @After + public void cleanupTestEnv() throws IOException { cleanLocalProjectDirectory(projectPath); - super.tearDown(); } + @Test + @Ignore("Service operator is deprecated") public void testCheckCreateService() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); String service = SERVICE_PREFIX + random.nextInt(); @@ -38,6 +43,8 @@ public void testCheckCreateService() throws IOException, ExecutionException, Int } } + @Test + @Ignore("Service operator is deprecated") public void testCheckCreateDeleteService() throws IOException, ExecutionException, InterruptedException { String project = PROJECT_PREFIX + random.nextInt(); String service = SERVICE_PREFIX + random.nextInt(); diff --git a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliTest.java b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliTest.java index 8ad5840ad..402310f5a 100644 --- a/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliTest.java +++ b/src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliTest.java @@ -18,6 +18,10 @@ import org.jboss.tools.intellij.openshift.tree.application.ApplicationsRootNode; import org.jboss.tools.intellij.openshift.utils.OdoCluster; import org.jboss.tools.intellij.openshift.utils.ToolFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import java.io.File; import java.io.IOException; @@ -30,9 +34,10 @@ import static org.jboss.tools.intellij.openshift.Constants.PLUGIN_FOLDER; import static org.mockito.Mockito.mock; - +@RunWith(JUnit4.class) public abstract class OdoCliTest extends BasePlatformTestCase { + // disabled since there is no more service operator available, and service binding operator is deprecated. see https://github.com/redhat-developer/service-binding-operator#deprecation-notice // see https://operatorhub.io/operator/cloud-native-postgresql/ STABLE channel for versions public static final String SERVICE_TEMPLATE = "cloud-native-postgresql"; public static final String SERVICE_KUBE_VERSION = "v1.16.2"; @@ -60,9 +65,8 @@ public abstract class OdoCliTest extends BasePlatformTestCase { private TestDialog previousTestDialog; - @Override - protected void setUp() throws Exception { - super.setUp(); + @Before + public void init() throws Exception { previousTestDialog = MessagesHelper.setTestDialog(TestDialog.OK); ToolFactory.getInstance().createOc(getProject()).whenComplete((ocTool, throwable) -> { try { @@ -74,10 +78,9 @@ protected void setUp() throws Exception { odo = getOdo().get(); } - @Override - protected void tearDown() throws Exception { + @After + public void cleanup() { MessagesHelper.setTestDialog(previousTestDialog); - super.tearDown(); } private CompletableFuture getOdo() {