Skip to content

Commit

Permalink
Implement ability to download operator install files + readme baseline (
Browse files Browse the repository at this point in the history
#4)

Signed-off-by: David Kornel <[email protected]>
  • Loading branch information
kornys authored Jul 30, 2024
1 parent e7c23ed commit 24f64ac
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ build/
.DS_Store

### Others ###
**.*kubeconfig
**.*kubeconfig

### Operator install files ###
operator-install-files/
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# STREAMS-E2E

Test suite for verify interoperability of streams components like kafka, flink, etc... managed by operators on kubernetes.

## Use latest released upstream operators install files
Run maven with profile `get-operator-files` to download all operators install files which will be used in test suite.

```bash
$ ./mvnw install -P get-operator-files
```
All operator install files are download into `operator-install-files` folder

## Use operators from operator catalog
TODO

## Use own install files
TDOD

## Use own operator metadata bundle-container
TODO

## Run tests
Run all tests.
```bash
$ ./mvnw verify
```

Run specific tag.
```bash
$ ./mvnw verify -Dgroups=smoke
```

Run specific test class or test
```bash
$ ./mvnw verify -Dit.tests=io.streams.e2e.dummy.DummyST
$ ./mvnw verify -Dit.tests=io.streams.e2e.dummy.DummyST#dummyTest
```

## Test configuration
TODO
52 changes: 49 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@

<junit.jupiter.version>5.10.3</junit.jupiter.version>
<junit.platform.version>1.10.3</junit.platform.version>
<maven.surefire.version>3.3.0</maven.surefire.version>
<maven.compile.plugin.version>3.13.0</maven.compile.plugin.version>
<maven.dependency.version>3.3.0</maven.dependency.version>
<maven.surefire.version>3.3.1</maven.surefire.version>

<!-- Build tools' properties -->
<spotbugs.version>4.8.6</spotbugs.version>
<maven.spotbugs.version>4.8.6.2</maven.spotbugs.version>
<maven.checkstyle.version>3.4.0</maven.checkstyle.version>
<maven.compile.plugin.version>3.13.0</maven.compile.plugin.version>
<maven.dependency.version>3.7.0</maven.dependency.version>
<maven.download.plugin.version>1.9.0</maven.download.plugin.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -264,4 +265,49 @@
</plugins>
</build>

<profiles>
<profile>
<id>get-operator-files</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>${maven.download.plugin.version}</version>
<executions>
<execution>
<id>get-strimzi</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.42.0/strimzi-0.42.0.tar.gz</url>
<outputDirectory>${basedir}/operator-install-files/</outputDirectory>
<outputFileName>strimzi.tar.gz</outputFileName>
<unpack>true</unpack>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
<pattern>^strimzi-\d+.\d+.\d+</pattern>
<replacement>strimzi-kafka-operator</replacement>
</org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
</fileMappers>
</configuration>
</execution>
</executions>
<configuration>
<overwrite>true</overwrite>
<failOnError>false</failOnError>
<skipCache>true</skipCache>
<retries>2</retries>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
8 changes: 7 additions & 1 deletion src/test/java/io/streams/e2e/Abstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

import io.skodjob.testframe.annotations.ResourceManager;
import io.skodjob.testframe.annotations.TestVisualSeparator;
import io.skodjob.testframe.resources.DeploymentType;
import io.skodjob.testframe.resources.InstallPlanType;
import io.skodjob.testframe.resources.KubeResourceManager;
import io.skodjob.testframe.resources.NamespaceType;
import io.skodjob.testframe.resources.OperatorGroupType;
import io.skodjob.testframe.resources.ServiceType;
import io.skodjob.testframe.resources.SubscriptionType;
import io.skodjob.testframe.utils.KubeUtils;
import io.streams.constants.TestConstants;
Expand All @@ -21,7 +24,10 @@ public class Abstract {
KubeResourceManager.getInstance().setResourceTypes(
new NamespaceType(),
new SubscriptionType(),
new OperatorGroupType()
new OperatorGroupType(),
new DeploymentType(),
new InstallPlanType(),
new ServiceType()
);
KubeResourceManager.getInstance().addCreateCallback(r -> {
if (r.getKind().equals("Namespace")) {
Expand Down

0 comments on commit 24f64ac

Please sign in to comment.