Skip to content

Commit 4108d03

Browse files
Use Kurrent image and lib
1 parent f48028a commit 4108d03

File tree

4 files changed

+197
-42
lines changed

4 files changed

+197
-42
lines changed

package-lock.json

Lines changed: 185 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/modules/kurrent/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "10.28.0",
44
"license": "MIT",
55
"keywords": [
6-
"eventstoredb",
76
"kurrent",
87
"testing",
98
"docker",
@@ -30,7 +29,7 @@
3029
"build": "tsc --project tsconfig.build.json"
3130
},
3231
"devDependencies": {
33-
"@eventstore/db-client": "^6.2.1"
32+
"@kurrent/kurrentdb-client": "^1.0.1"
3433
},
3534
"dependencies": {
3635
"testcontainers": "^10.28.0"

packages/modules/kurrent/src/kurrent-container.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { EventStoreDBClient, StreamingRead, StreamSubscription } from "@eventstore/db-client";
1+
import { KurrentDBClient, StreamSubscription } from "@kurrent/kurrentdb-client";
22
import { KurrentContainer } from "./kurrent-container";
33

44
describe("KurrentContainer", { timeout: 240_000 }, () => {
55
// startContainer {
66
it("should execute write and read", async () => {
77
const container = await new KurrentContainer().start();
88

9-
const client = EventStoreDBClient.connectionString(container.getConnectionString());
9+
const client = KurrentDBClient.connectionString(container.getConnectionString());
1010

1111
await client.appendToStream("User-1", [
1212
{
@@ -31,7 +31,7 @@ describe("KurrentContainer", { timeout: 240_000 }, () => {
3131
metadata: {
3232
someMetadata: "bar",
3333
},
34-
revision: 0n,
34+
revision: 0,
3535
streamId: "User-1",
3636
type: "UserCreated",
3737
}),
@@ -45,7 +45,7 @@ describe("KurrentContainer", { timeout: 240_000 }, () => {
4545
// usingStandardProjections {
4646
it("should use built-in projections", async () => {
4747
const container = await new KurrentContainer().start();
48-
const client = EventStoreDBClient.connectionString(container.getConnectionString());
48+
const client = KurrentDBClient.connectionString(container.getConnectionString());
4949

5050
await client.appendToStream("Todo-1", [
5151
{
@@ -87,7 +87,7 @@ describe("KurrentContainer", { timeout: 240_000 }, () => {
8787
// }
8888
});
8989

90-
async function consumeSteamingRead(read: StreamingRead<unknown>): Promise<unknown[]> {
90+
async function consumeSteamingRead(read: AsyncIterableIterator<unknown>): Promise<unknown[]> {
9191
const events = [];
9292

9393
for await (const event of read) {

packages/modules/kurrent/src/kurrent-container.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ export class StartedKurrentContainer extends AbstractStartedContainer {
66
}
77
}
88

9-
const EVENT_STORE_DB_PORT = 2113;
10-
119
export class KurrentContainer extends GenericContainer {
12-
constructor(image = "eventstore/eventstore:24.10") {
10+
constructor(image = "kurrentplatform/kurrentdb:25.0") {
1311
super(image);
1412

15-
this.withExposedPorts(EVENT_STORE_DB_PORT)
13+
this.withExposedPorts(2113)
1614
.withEnvironment({
17-
EVENTSTORE_CLUSTER_SIZE: "1",
18-
EVENTSTORE_RUN_PROJECTIONS: "All",
19-
EVENTSTORE_START_STANDARD_PROJECTIONS: "true",
20-
EVENTSTORE_INSECURE: "true",
15+
KURRENTDB_CLUSTER_SIZE: "1",
16+
KURRENTDB_RUN_PROJECTIONS: "All",
17+
KURRENTDB_START_STANDARD_PROJECTIONS: "true",
18+
KURRENTDB_INSECURE: "true",
2119
})
2220
.withStartupTimeout(120_000)
2321
.withWaitStrategy(Wait.forHealthCheck());

0 commit comments

Comments
 (0)