Skip to content

Commit 819fd80

Browse files
Move more test images to Dockerfiles for Dependabot (#1100)
1 parent ba24450 commit 819fd80

File tree

9 files changed

+13
-27
lines changed

9 files changed

+13
-27
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
FROM chromadb/chroma:1.0.15
2+
FROM ollama/ollama:0.9.6

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
77
import { ChromaDBContainer } from "./chromadb-container";
88

99
const IMAGE = getImage(__dirname);
10+
const OLLAMA_IMAGE = getImage(__dirname, 1);
1011

1112
describe("ChromaDBContainer", { timeout: 360_000 }, () => {
1213
it("should connect", async () => {
@@ -36,7 +37,7 @@ describe("ChromaDBContainer", { timeout: 360_000 }, () => {
3637
// queryCollectionWithEmbeddingFunction {
3738
await using container = await new ChromaDBContainer(IMAGE).start();
3839

39-
await using ollama = await new GenericContainer("ollama/ollama").withExposedPorts(11434).start();
40+
await using ollama = await new GenericContainer(OLLAMA_IMAGE).withExposedPorts(11434).start();
4041
await ollama.exec(["ollama", "pull", "nomic-embed-text"]);
4142
const client = new ChromaClient({ path: container.getHttpUrl() });
4243
const embedder = new OllamaEmbeddingFunction({

packages/modules/k3s/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
FROM rancher/k3s:v1.33.3-k3s1
2+
FROM rancher/kubectl:v1.31.2

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
44
import { K3sContainer } from "./k3s-container";
55

66
const IMAGE = getImage(__dirname);
7+
const KUBECTL_IMAGE = getImage(__dirname, 1);
78

89
describe("K3sContainer", { timeout: 120_000 }, () => {
910
// K3sContainer runs as a privileged container
@@ -74,7 +75,7 @@ describe("K3sContainer", { timeout: 120_000 }, () => {
7475

7576
const kubeConfig = container.getAliasedKubeConfig("k3s");
7677

77-
await using kubectlContainer = await new GenericContainer("rancher/kubectl:v1.31.2")
78+
await using kubectlContainer = await new GenericContainer(KUBECTL_IMAGE)
7879
.withNetwork(network)
7980
.withCopyContentToContainer([{ content: kubeConfig, target: "/home/kubectl/.kube/config" }])
8081
.withCommand(["get", "namespaces"])
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
FROM localstack/localstack:4.6.0
2+
FROM amazon/aws-cli:2.7.27

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
44
import { LOCALSTACK_PORT, LocalstackContainer } from "./localstack-container";
55

66
const IMAGE = getImage(__dirname);
7+
const AWSCLI_IMAGE = getImage(__dirname, 1);
78

89
const runAwsCliAgainstDockerNetworkContainer = async (
910
command: string,
@@ -47,7 +48,7 @@ describe("LocalStackContainer", { timeout: 180_000 }, () => {
4748
.withEnvironment({ SQS_ENDPOINT_STRATEGY: "path" })
4849
.start();
4950

50-
await using awsCliInDockerNetwork = await new GenericContainer("amazon/aws-cli:2.7.27")
51+
await using awsCliInDockerNetwork = await new GenericContainer(AWSCLI_IMAGE)
5152
.withNetwork(network)
5253
.withEntrypoint(["bash"])
5354
.withCommand(["-c", "sleep infinity"])

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,6 @@ describe("Neo4jContainer", { timeout: 180_000 }, () => {
2626
// }
2727
});
2828

29-
// v5DefaultPassword {
30-
it("should connect to neo4j:v5 with default password", async () => {
31-
await using container = await new Neo4jContainer("neo4j:5.23.0").start();
32-
const driver = neo4j.driver(
33-
container.getBoltUri(),
34-
neo4j.auth.basic(container.getUsername(), container.getPassword())
35-
);
36-
37-
const session = driver.session();
38-
const personName = "Chris";
39-
const result = await session.run("CREATE (a:Person {name: $name}) RETURN a", { name: personName });
40-
const singleRecord = result.records[0];
41-
const node = singleRecord.get(0);
42-
expect(node.properties.name).toBe(personName);
43-
44-
await session.close();
45-
await driver.close();
46-
});
47-
// }
48-
4929
it("should connect with custom password", async () => {
5030
// setPassword {
5131
await using container = await new Neo4jContainer(IMAGE).withPassword("xyz1234@!").start();
@@ -88,7 +68,7 @@ describe("Neo4jContainer", { timeout: 180_000 }, () => {
8868

8969
it("should work with plugin list", async () => {
9070
// pluginsList {
91-
await using container = await new Neo4jContainer("neo4j:5.26.5")
71+
await using container = await new Neo4jContainer(IMAGE)
9272
.withPlugins([Neo4jPlugin.APOC_EXTENDED, Neo4jPlugin.GRAPH_DATA_SCIENCE])
9373
.withStartupTimeout(120_000)
9474
.start();

packages/modules/redis/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
FROM redis:8.0
2+
FROM redis/redis-stack-server:7.4.0-v4

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
55
import { RedisContainer } from "./redis-container";
66

77
const IMAGE = getImage(__dirname);
8+
const REDISSTACK_IMAGE = getImage(__dirname, 1);
89

910
describe("RedisContainer", { timeout: 240_000 }, () => {
1011
it("should connect and execute set-get", async () => {
@@ -106,9 +107,7 @@ describe("RedisContainer", { timeout: 240_000 }, () => {
106107

107108
it("should start with redis-stack-server and json module", async () => {
108109
// startWithRedisStack {
109-
await using container = await new RedisContainer("redis/redis-stack-server:7.4.0-v4")
110-
.withPassword("testPassword")
111-
.start();
110+
await using container = await new RedisContainer(REDISSTACK_IMAGE).withPassword("testPassword").start();
112111

113112
const client = createClient({ url: container.getConnectionUrl() });
114113
await client.connect();

0 commit comments

Comments
 (0)