Skip to content

Commit 20de3d6

Browse files
authored
chore: disable service tests (redhat-developer#948)
* chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet <[email protected]> * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet <[email protected]> * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet <[email protected]> * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet <[email protected]> * chore: update to latest IJ 2024.3 Signed-off-by: Stephane Bouchet <[email protected]> * chore: disable services tests Signed-off-by: Stephane Bouchet <[email protected]> * chore: disable services tests Signed-off-by: Stephane Bouchet <[email protected]> * chore: disable services tests Signed-off-by: Stephane Bouchet <[email protected]> * chore: disable services tests Signed-off-by: Stephane Bouchet <[email protected]> * chore: disable services tests Signed-off-by: Stephane Bouchet <[email protected]> * chore: disable services tests Signed-off-by: Stephane Bouchet <[email protected]> --------- Signed-off-by: Stephane Bouchet <[email protected]>
1 parent 05fc702 commit 20de3d6

17 files changed

+126
-63
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
branches: [ main ]
99

10+
permissions:
11+
pull-requests: write
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1215
cancel-in-progress: true
@@ -75,19 +78,20 @@ jobs:
7578
validate-wrappers: true
7679
- uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde #v1.10.0
7780
name: Start cluster
78-
- name: Setup cluster
79-
run: |
80-
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0
81-
kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
82-
kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml
83-
nb=0
84-
echo -n "Waiting for operator to show up "
85-
while [ "$nb" != "2" ]
86-
do
87-
echo -n "."
88-
sleep 1
89-
nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
90-
done
81+
# service setup disabled along with service test because service binding operator is deprecated, and postgres service isn't available anymore
82+
# - name: Setup cluster
83+
# run: |
84+
# curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0
85+
# kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
86+
# kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml
87+
# nb=0
88+
# echo -n "Waiting for operator to show up "
89+
# while [ "$nb" != "2" ]
90+
# do
91+
# echo -n "."
92+
# sleep 1
93+
# nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
94+
# done
9195
- name: Grant execute permission for gradlew
9296
run: chmod +x gradlew
9397
- name: Play integration tests

.github/workflows/cluster_integration_ui_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
validate-wrappers: true
2424
- uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde #v1.10.0
2525
name: Start cluster
26-
# service setup disabled along with service test
26+
# service setup disabled along with service test because service binding operator is deprecated, and postgres service isn't available anymore
2727
# - name: Setup cluster
2828
# run: |
2929
# curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0

.github/workflows/conventionalCheck.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ on:
66
- opened
77
- edited
88
- synchronize
9+
- reopened
10+
11+
permissions:
12+
pull-requests: read
913

1014
jobs:
1115
main:
16+
name: Validate PR title
1217
runs-on: ubuntu-latest
1318
steps:
1419
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 #v5.5.3

.github/workflows/nightly.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ jobs:
3939
- name: Setup Java
4040
uses: actions/setup-java@v4
4141
with:
42-
distribution: temurin
4342
java-version: 17
43+
distribution: 'temurin'
44+
cache: 'gradle'
4445

4546
# Setup Gradle
4647
- name: Setup Gradle

.github/workflows/validate_IJ_versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
IJ: [ 2022.3, 2023.1, 2023.2, 2023.3, 2024.1, 2024.2 ]
12+
IJ: [ 2022.3, 2023.1, 2023.2, 2023.3, 2024.1, 2024.2, 2024.3 ]
1313

1414
steps:
1515
- name: Checkout Code

build.gradle.kts

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2+
import org.gradle.api.tasks.testing.logging.TestLogEvent
13
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
24
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
5+
import org.jetbrains.intellij.platform.gradle.models.ProductRelease
36

47
plugins {
8+
id("idea")
59
id("java") // Java support
610
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
7-
alias(libs.plugins.testLogger) // Nice test logs
811
id("jacoco") // Code coverage
912
alias(libs.plugins.sonarqube) // SonarQube
1013
}
@@ -127,6 +130,13 @@ tasks {
127130
test {
128131
systemProperty("com.redhat.devtools.intellij.telemetry.mode", "disabled")
129132
jvmArgs("-Djava.awt.headless=true")
133+
useJUnit()
134+
testLogging {
135+
events(TestLogEvent.FAILED)
136+
exceptionFormat = TestExceptionFormat.FULL
137+
showStackTraces = true
138+
showStandardStreams = false
139+
}
130140
}
131141

132142
withType<Test> {
@@ -165,6 +175,11 @@ tasks {
165175
mainClass.set("org.jboss.tools.intellij.openshift.ui.sandbox.SandboxRegistrationServerMock")
166176
}
167177

178+
printProductsReleases {
179+
channels = listOf(ProductRelease.Channel.EAP)
180+
types = listOf(IntelliJPlatformType.IntellijIdeaCommunity)
181+
untilBuild = provider { null }
182+
}
168183
}
169184

170185
sourceSets {
@@ -191,22 +206,22 @@ val integrationTest by intellijPlatformTesting.testIde.registering {
191206
group = "verification"
192207
testClassesDirs = sourceSets["it"].output.classesDirs
193208
classpath = sourceSets["it"].runtimeClasspath
194-
testlogger {
195-
showStandardStreams = true
196-
showPassedStandardStreams = false
197-
showSkippedStandardStreams = false
198-
showFailedStandardStreams = true
199-
showFullStackTraces = true
209+
testLogging {
210+
events(TestLogEvent.FAILED)
211+
exceptionFormat = TestExceptionFormat.FULL
212+
showStackTraces = true
213+
showStandardStreams = false
200214
}
201215
jvmArgs("-Djava.awt.headless=true")
216+
useJUnitPlatform {
217+
includeEngines("junit-vintage")
218+
excludeEngines("junit-jupiter")
219+
}
202220
shouldRunAfter(tasks["test"])
203221
}
204222

205-
plugins {
206-
robotServerPlugin()
207-
}
208-
209223
dependencies {
224+
testRuntimeOnly(libs.junit.vintage.engine)
210225
testImplementation(libs.junit.platform.launcher)
211226
testImplementation(libs.junit.platform.suite)
212227
testImplementation(libs.junit.jupiter)
@@ -228,12 +243,11 @@ val integrationUITest by intellijPlatformTesting.testIde.registering {
228243
group = "verification"
229244
testClassesDirs = sourceSets["it"].output.classesDirs
230245
classpath = sourceSets["it"].runtimeClasspath
231-
testlogger {
246+
testLogging {
247+
events(TestLogEvent.FAILED)
248+
exceptionFormat = TestExceptionFormat.FULL
249+
showStackTraces = true
232250
showStandardStreams = true
233-
showPassedStandardStreams = false
234-
showSkippedStandardStreams = false
235-
showFailedStandardStreams = true
236-
showFullStackTraces = true
237251
}
238252
jvmArgs("-Djava.awt.headless=false") // use of clipboard in AboutPublicTest, set to false
239253
val includes = if (System.getenv("CLUSTER_ALREADY_LOGGED_IN") == null) "**/PublicTestsSuite.class" else "**/ClusterTestsSuite.class"

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ jetBrainsChannel=stable
77
platformVersion=2024.3
88

99
# Gradle Releases -> https://github.com/gradle/gradle/releases
10-
gradleVersion = 8.5
10+
gradleVersion=8.5
1111

1212
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
13-
platformBundledPlugins = com.intellij.java, org.jetbrains.plugins.yaml, org.jetbrains.plugins.terminal
14-
platformPlugins = com.redhat.devtools.intellij.telemetry:1.2.1.62, com.redhat.devtools.intellij.kubernetes:1.4.0.4
13+
platformBundledPlugins=com.intellij.java, org.jetbrains.plugins.yaml, org.jetbrains.plugins.terminal
14+
platformPlugins=com.redhat.devtools.intellij.telemetry:1.2.1.62, com.redhat.devtools.intellij.kubernetes:1.4.0.4
1515

1616
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
17-
pluginSinceBuild = 223
17+
pluginSinceBuild=223
1818

1919
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
20-
kotlin.stdlib.default.dependency = false
20+
kotlin.stdlib.default.dependency=false
2121

2222
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
23-
org.gradle.configuration-cache = true
23+
org.gradle.configuration-cache=true
2424

2525
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
26-
org.gradle.caching = true
26+
org.gradle.caching=true
2727

2828
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx4g -Xms1g

gradle/libs.versions.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ annotations = "24.0.0"
1717

1818
# plugins
1919
gradleIntelliJPlugin = "2.0.1"
20-
testlogger = "4.0.0"
2120
sonarqube = "5.1.0.4882"
2221

2322
[libraries]
@@ -37,11 +36,11 @@ junit-platform-suite = { group = "org.junit.platform", name = "junit-platform-su
3736
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
3837
junit-jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit-jupiter" }
3938
junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" }
39+
junit-vintage-engine = { group = "org.junit.vintage", name = "junit-vintage-engine", version.ref = "junit-jupiter" }
4040
devtools-common-ui-test = { group = "com.redhat.devtools.intellij", name = "intellij-common-ui-test-library", version.ref = "devtools-common-ui-test" }
4141
awaitility = { group = "org.awaitility", name = "awaitility", version.ref = "awaitility" }
4242
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
4343

4444
[plugins]
4545
gradleIntelliJPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "gradleIntelliJPlugin" }
46-
testLogger = { id = "com.adarshr.test-logger", version.ref = "testlogger" }
4746
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" }

src/it/java/org/jboss/tools/intellij/openshift/utils/helm/Charts.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public class Charts {
2222
public static final String CHART_KUBEROS = "kuberos";
2323
public static final String CHART_SYSDIG = "sysdig";
2424

25-
public static final Pair<String, String> REPOSITORY_STABLE = new Pair("stable", "https://charts.helm.sh/stable");
26-
public static final Pair<String, String> REPOSITORY_OPENSHIFT = new Pair("openshift", "https://charts.openshift.io/");
25+
public static final Pair<String, String> REPOSITORY_STABLE = new Pair<>("stable", "https://charts.helm.sh/stable");
2726

2827
public static Chart get(String name, Helm helm) throws Exception {
2928
Optional<Chart> found = helm.search(name).stream().findFirst();
@@ -35,4 +34,8 @@ public static void addRepository(Pair<String, String> pair, Helm helm) throws IO
3534
helm.addRepo(pair.first, pair.second, null);
3635
}
3736

37+
public static void removeRepository(Pair<String, String> pair, Helm helm) throws IOException {
38+
helm.removeRepos(pair.first);
39+
}
40+
3841
}

src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliRepoTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
import java.io.IOException;
1515
import java.util.List;
1616

17-
import static org.assertj.core.api.Assertions.assertThat;
18-
1917
public class HelmCliRepoTest extends HelmCliTest {
2018

2119
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
4745
List<String> helmRepositoryNames = helm.listRepos().stream()
4846
.map(HelmRepository::getName)
4947
.toList();
50-
assertThat(helmRepositoryNames).contains(name, name2);
48+
assertTrue(helmRepositoryNames.contains(name));
49+
assertTrue(helmRepositoryNames.contains(name2));
5150
// when
5251
helm.removeRepos(name, name2);
5352
// then
5453
helmRepositoryNames = helm.listRepos().stream()
5554
.map(HelmRepository::getName)
5655
.toList();
57-
assertThat(helmRepositoryNames).doesNotContain(name, name2);
56+
assertFalse(helmRepositoryNames.contains(name));
57+
assertFalse(helmRepositoryNames.contains(name2));
5858
} finally {
5959
silentlyRemoveRepos(name, name2);
6060
}

src/it/java/org/jboss/tools/intellij/openshift/utils/helm/HelmCliTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ protected void tearDown() throws Exception {
4545
if (tool != null) {
4646
tool.get().deleteProject(projectName);
4747
}
48+
Charts.removeRepository(Charts.REPOSITORY_STABLE, helm);
4849
super.tearDown();
4950
}
5051

src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliCatalogTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
******************************************************************************/
1111
package org.jboss.tools.intellij.openshift.utils.odo;
1212

13+
import org.junit.Ignore;
14+
import org.junit.Test;
15+
1316
import java.io.IOException;
1417
import java.util.List;
1518
import java.util.concurrent.ExecutionException;
@@ -19,6 +22,7 @@
1922

2023
public class OdoCliCatalogTest extends OdoCliTest {
2124

25+
@Test
2226
public void testCheckGetComponentTypes() throws IOException, ExecutionException, InterruptedException {
2327
String project = PROJECT_PREFIX + random.nextInt();
2428
try {
@@ -30,6 +34,8 @@ public void testCheckGetComponentTypes() throws IOException, ExecutionException,
3034
}
3135
}
3236

37+
@Test
38+
@Ignore("Service operator is deprecated")
3339
public void testCheckGetServiceTemplates() throws IOException, ExecutionException, InterruptedException {
3440
String project = PROJECT_PREFIX + random.nextInt();
3541
try {
@@ -42,6 +48,8 @@ public void testCheckGetServiceTemplates() throws IOException, ExecutionExceptio
4248
}
4349
}
4450

51+
@Test
52+
@Ignore("Service operator is deprecated")
4553
public void testCheckMultiPlansServiceTemplates() throws IOException, ExecutionException, InterruptedException {
4654
String project = PROJECT_PREFIX + random.nextInt();
4755
try {

src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliComponentTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.junit.AfterClass;
1919
import org.junit.Before;
2020
import org.junit.BeforeClass;
21+
import org.junit.Ignore;
2122
import org.junit.Test;
2223
import org.junit.runner.RunWith;
2324
import org.junit.runners.Parameterized;
@@ -131,6 +132,7 @@ public void checkCreateAndDeleteComponent() throws IOException, ExecutionExcepti
131132
}
132133

133134
@Test
135+
@Ignore("Service operator is deprecated")
134136
public void checkCreateComponentAndLinkService() throws IOException, ExecutionException, InterruptedException {
135137
createComponent(project, component, projectPath);
136138
ServiceTemplate serviceTemplate = getServiceTemplate();

src/it/java/org/jboss/tools/intellij/openshift/utils/odo/OdoCliProjectTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,35 @@
1010
******************************************************************************/
1111
package org.jboss.tools.intellij.openshift.utils.odo;
1212

13+
import org.junit.Test;
14+
1315
import java.io.IOException;
1416
import java.util.List;
1517
import java.util.concurrent.ExecutionException;
1618

1719
public class OdoCliProjectTest extends OdoCliTest {
1820

21+
@Test
1922
public void testCheckCreateProject() throws IOException, ExecutionException, InterruptedException {
2023
String project = PROJECT_PREFIX + random.nextInt();
2124
try {
25+
List<String> projects = odo.getNamespaces();
26+
assertFalse(projects.isEmpty());
2227
createProject(project);
28+
assertEquals(projects.size()+1, odo.getNamespaces().size());
2329
} finally {
2430
odo.deleteProject(project);
2531
}
2632
}
2733

34+
@Test
2835
public void testCheckListProjects() throws IOException, ExecutionException, InterruptedException {
2936
String project = PROJECT_PREFIX + random.nextInt();
3037
try {
3138
createProject(project);
3239
List<String> projects = odo.getNamespaces();
3340
assertFalse(projects.isEmpty());
41+
assertTrue(projects.contains(project));
3442
} finally {
3543
odo.deleteProject(project);
3644
}

0 commit comments

Comments
 (0)