Skip to content

Commit

Permalink
E2E tests: allow to use an external kafka cluster (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi authored Sep 20, 2023
1 parent 3ae4604 commit a08227a
Show file tree
Hide file tree
Showing 26 changed files with 677 additions and 290 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ jobs:
uname -m
./dev/prepare-minikube-for-e2e-tests.sh
./mvnw install -pl langstream-e2e-tests -am -DskipTests
./mvnw verify -pl langstream-e2e-tests -De2eTests -DexcludedGroups="needs-credentials"
./mvnw verify -pl langstream-e2e-tests -De2eTests -DexcludedGroups="needs-credentials" -Dlangstream.tests.recycleenv=true
- name: Upload Surefire reports
uses: actions/upload-artifact@v3
if: failure()
continue-on-error: true
with:
name: test-logs-${{ matrix.group }}
name: test-logs-e2e
path: "**/target/e2e-test-logs/*"
retention-days: 7
11 changes: 11 additions & 0 deletions langstream-e2e-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>langstream-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import ai.langstream.tests.util.BaseEndToEndTest;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package ai.langstream.tests;

import ai.langstream.tests.util.BaseEndToEndTest;
import ai.langstream.tests.util.ConsumeGatewayMessage;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import ai.langstream.deployer.k8s.api.crds.agents.AgentCustomResource;
import ai.langstream.deployer.k8s.api.crds.apps.ApplicationCustomResource;
import ai.langstream.tests.util.BaseEndToEndTest;
import io.fabric8.kubernetes.api.model.Secret;
import java.util.List;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -96,7 +97,7 @@ public void test(String appDir) {
.size());
});

final List<String> topics = getAllTopicsFromKafka();
Assertions.assertEquals(List.of("TEST_TOPIC_0"), topics);
final List<String> topics = getAllTopics();
Assertions.assertEquals(List.of("ls-test-topic0"), topics);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package ai.langstream.tests;

import ai.langstream.tests.util.BaseEndToEndTest;
import ai.langstream.tests.util.ConsumeGatewayMessage;
import java.util.List;
import java.util.Map;
Expand Down
Loading

0 comments on commit a08227a

Please sign in to comment.