Skip to content

Commit c24b783

Browse files
Fixes
1 parent 42f1afe commit c24b783

File tree

5 files changed

+7
-122
lines changed

5 files changed

+7
-122
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { BucketDefinition } from "./bucket-definition";
44
import { CouchbaseContainer, StartedCouchbaseContainer } from "./couchbase-container";
55
import { CouchbaseService } from "./couchbase-service";
66

7-
const IMAGE = "couchbase/server:6.5.1";
8-
97
describe("CouchbaseContainer", { timeout: 180_000 }, () => {
108
// upsertAndGet {
119
const upsertAndGet = async (

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

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as path from "path";
44
import { GenericContainer, Network, StartedTestContainer } from "testcontainers";
55
import { KafkaContainer } from "./kafka-container";
66

7-
const IMAGE="confluentinc/cp-kafka:7.2.2"
7+
const IMAGE = "confluentinc/cp-kafka:7.2.2";
88

99
describe("KafkaContainer", { timeout: 240_000 }, () => {
1010
// connectBuiltInZK {
@@ -207,78 +207,22 @@ describe("KafkaContainer", { timeout: 240_000 }, () => {
207207

208208
it("should connect using kraft and custom network", async () => {
209209
const network = await new Network().start();
210-
const kafkaContainer = await new KafkaContainer(IMAGE).withKraft().withNetwork(network).withExposedPorts(9093).start();
211-
212-
await testPubSub(kafkaContainer);
213-
214-
await kafkaContainer.stop();
215-
await network.stop();
216-
});
217-
218-
it("should throw an error when using kraft wit sasl and confluence platfom below 7.5.0", async () => {
219-
const kafkaContainer = new KafkaContainer("confluentinc/cp-kafka:7.4.0")
220-
.withKraft()
221-
.withExposedPorts(9093)
222-
.withSaslSslListener({
223-
port: 9094,
224-
sasl: {
225-
mechanism: "SCRAM-SHA-512",
226-
user: {
227-
name: "app-user",
228-
password: "userPassword",
229-
},
230-
},
231-
keystore: {
232-
content: "fake",
233-
passphrase: "serverKeystorePassword",
234-
},
235-
truststore: {
236-
content: "fake",
237-
passphrase: "serverTruststorePassword",
238-
},
239-
});
240-
await expect(() => kafkaContainer.start()).rejects.toThrow(
241-
"Provided Confluent Platform's version 7.4.0 is not supported in Kraft mode with sasl (must be 7.5.0 or above)"
242-
);
243-
});
244-
245-
it("should connect using ZooKeeper", async () => {
246-
const network = await new Network().start();
247-
248-
const zookeeperContainer = await new GenericContainer("confluentinc/cp-zookeeper:7.2.2")
249-
.withExposedPorts(2181)
250-
.withNetwork(network)
251-
.withNetworkAliases("zookeeper")
252-
.withEnvironment({
253-
ZOOKEEPER_CLIENT_PORT: "2181",
254-
})
255-
.start();
256-
257210
const kafkaContainer = await new KafkaContainer(IMAGE)
258-
.withZooKeeper("zookeeper", 2181)
211+
.withKraft()
259212
.withNetwork(network)
260213
.withExposedPorts(9093)
261214
.start();
262215

263216
await testPubSub(kafkaContainer);
264217

265-
await zookeeperContainer.stop();
266218
await kafkaContainer.stop();
267219
await network.stop();
268220
});
269221

270-
it("should connect using KRaft", async () => {
271-
const kafkaContainer = await new KafkaContainer(IMAGE).withKraft().withExposedPorts(9093).start();
272-
273-
await testPubSub(kafkaContainer);
274-
275-
await kafkaContainer.stop();
276-
});
277-
278-
it("should connect with KRaft and SASL_SSL", async () => {
279-
const kafkaContainer = await new KafkaContainer(IMAGE)
222+
it("should throw an error when using kraft wit sasl and confluence platfom below 7.5.0", async () => {
223+
const kafkaContainer = new KafkaContainer("confluentinc/cp-kafka:7.4.0")
280224
.withKraft()
281-
.withExposedPorts(9093, 9099)
225+
.withExposedPorts(9093)
282226
.withSaslSslListener({
283227
port: 9094,
284228
sasl: {

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ describe("LocalStackContainer", { timeout: 180_000 }, () => {
8585
});
8686

8787
it("should override LOCALSTACK_HOST with last network alias", async () => {
88-
const container = await new LocalstackContainer(IMAGE)
89-
.withNetworkAliases("other", "myalias")
90-
.start();
88+
const container = await new LocalstackContainer(IMAGE).withNetworkAliases("other", "myalias").start();
9189

9290
const { output, exitCode } = await container.exec(["printenv", "LOCALSTACK_HOST"]);
9391
expect(exitCode).toBe(0);

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

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -144,59 +144,4 @@ describe("MariaDb", { timeout: 240_000 }, () => {
144144
await client.end();
145145
await container.stop();
146146
});
147-
148-
it("should set custom root password", async () => {
149-
const rootPassword = "rootPassword";
150-
const container = await new MariaDbContainer(IMAGE).withRootPassword(rootPassword).start();
151-
152-
const client = await mariadb.createConnection({
153-
host: container.getHost(),
154-
port: container.getPort(),
155-
database: container.getDatabase(),
156-
user: container.getUsername(),
157-
password: container.getUserPassword(),
158-
});
159-
160-
const rows = await client.query("SELECT 1 as res");
161-
expect(rows).toEqual([{ res: 1 }]);
162-
163-
await client.end();
164-
await container.stop();
165-
});
166-
167-
it("should allow connecting with root user", async () => {
168-
const container = await new MariaDbContainer(IMAGE).start();
169-
170-
const client = await mariadb.createConnection({
171-
host: container.getHost(),
172-
port: container.getPort(),
173-
database: container.getDatabase(),
174-
user: container.getUsername(),
175-
password: container.getUserPassword(),
176-
});
177-
178-
const rows = await client.query("SELECT 1 as res");
179-
expect(rows).toEqual([{ res: 1 }]);
180-
181-
await client.end();
182-
await container.stop();
183-
});
184-
185-
it("should convert database URI to root URI and use it", async () => {
186-
const container = await new MariaDbContainer(IMAGE).start();
187-
188-
const client = await mariadb.createConnection({
189-
host: container.getHost(),
190-
port: container.getPort(),
191-
database: container.getDatabase(),
192-
user: container.getUsername(),
193-
password: container.getUserPassword(),
194-
});
195-
196-
const rows = await client.query("SELECT 1 as res");
197-
expect(rows).toEqual([{ res: 1 }]);
198-
199-
await client.end();
200-
await container.stop();
201-
});
202147
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ describe("Neo4jContainer", { timeout: 180_000 }, () => {
8585
await container.stop();
8686
});
8787
// }
88-
});
88+
});

0 commit comments

Comments
 (0)