Skip to content

Commit 2d8bbfd

Browse files
authored
Merge branch 'main' into dependabot/github_actions/gradle/actions-4.1.0
2 parents 2cfb5f8 + a71743b commit 2d8bbfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+25
-13005
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ bin/
88

99
lsp/
1010
/.run/
11+
/.intellijPlatform/

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

+24-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@
1010
******************************************************************************/
1111
package org.jboss.tools.intellij.openshift.utils.odo;
1212

13+
import com.intellij.util.io.ZipUtil;
1314
import com.redhat.devtools.intellij.common.utils.ExecHelper;
15+
import org.apache.commons.io.FileUtils;
1416
import org.junit.After;
17+
import org.junit.AfterClass;
1518
import org.junit.Before;
19+
import org.junit.BeforeClass;
1620
import org.junit.Test;
1721
import org.junit.runner.RunWith;
1822
import org.junit.runners.Parameterized;
1923

2024
import java.io.File;
2125
import java.io.IOException;
2226
import java.net.ServerSocket;
27+
import java.nio.file.Path;
2328
import java.util.Arrays;
2429
import java.util.List;
2530
import java.util.concurrent.ExecutionException;
@@ -30,12 +35,13 @@
3035

3136
@RunWith(Parameterized.class)
3237
public class OdoCliComponentTest extends OdoCliTest {
33-
private static final String COMPONENT_PATH = "src/it/projects/go";
38+
private static final String PROJECT_NAME = "go";
39+
private static final String COMPONENT_PATH = "src/it/projects/";
3440
private final ComponentFeature feature;
3541
private String project;
3642
private String component;
3743
private String service;
38-
private final String projectPath = new File(COMPONENT_PATH).getAbsolutePath();
44+
private final String projectPath = new File(COMPONENT_PATH + PROJECT_NAME).getAbsolutePath();
3945

4046
public OdoCliComponentTest(ComponentFeature feature, String label) {
4147
this.feature = feature;
@@ -49,6 +55,18 @@ public static Iterable<Object[]> data() {
4955
});
5056
}
5157

58+
@BeforeClass
59+
public static void initTestProject() throws IOException {
60+
Path destDir = new File(COMPONENT_PATH).toPath();
61+
Path srcFile = new File(COMPONENT_PATH + PROJECT_NAME + ".zip").toPath();
62+
ZipUtil.extract(srcFile, destDir, null);
63+
}
64+
65+
@AfterClass
66+
public static void deleteTestProject() throws IOException {
67+
FileUtils.deleteDirectory(new File(COMPONENT_PATH));
68+
}
69+
5270
@Before
5371
public void initTestEnv() throws IOException {
5472
project = PROJECT_PREFIX + random.nextInt();
@@ -127,13 +145,16 @@ public void checkCreateComponentAndLinkService() throws IOException, ExecutionEx
127145
Binding binding = odo.link(projectPath, target);
128146
assertNotNull(binding);
129147
List<Binding> bindings = odo.listBindings(projectPath);
148+
assertNotNull(bindings);
130149
assertEquals(1, bindings.size());
131-
//cleanup
150+
// cleanup
132151
odo.deleteBinding(projectPath, binding.getName());
133152
bindings = odo.listBindings(projectPath);
153+
assertNotNull(bindings);
134154
assertEquals(0, bindings.size());
135155
odo.deleteService(project, deployedService);
136156
deployedServices = odo.getServices(project);
157+
assertNotNull(deployedServices);
137158
assertEquals(0, deployedServices.size());
138159
}
139160

Diff for: src/it/projects/go.zip

1.18 KB
Binary file not shown.

Diff for: src/it/projects/go/.gitignore

-3
This file was deleted.

Diff for: src/it/projects/go/README.md

-3
This file was deleted.

Diff for: src/it/projects/go/go.mod

-3
This file was deleted.

Diff for: src/it/projects/go/main.go

-15
This file was deleted.

Diff for: src/it/projects/nodejs.zip

15 KB
Binary file not shown.

Diff for: src/it/projects/nodejs/.gitignore

-107
This file was deleted.

0 commit comments

Comments
 (0)