Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/modules/chromadb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
FROM chromadb/chroma:1.0.15
FROM ollama/ollama:0.9.6
3 changes: 2 additions & 1 deletion packages/modules/chromadb/src/chromadb-container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
import { ChromaDBContainer } from "./chromadb-container";

const IMAGE = getImage(__dirname);
const OLLAMA_IMAGE = getImage(__dirname, 1);

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

await using ollama = await new GenericContainer("ollama/ollama").withExposedPorts(11434).start();
await using ollama = await new GenericContainer(OLLAMA_IMAGE).withExposedPorts(11434).start();
await ollama.exec(["ollama", "pull", "nomic-embed-text"]);
const client = new ChromaClient({ path: container.getHttpUrl() });
const embedder = new OllamaEmbeddingFunction({
Expand Down
1 change: 1 addition & 0 deletions packages/modules/k3s/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
FROM rancher/k3s:v1.33.3-k3s1
FROM rancher/kubectl:v1.31.2
3 changes: 2 additions & 1 deletion packages/modules/k3s/src/k3s-container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
import { K3sContainer } from "./k3s-container";

const IMAGE = getImage(__dirname);
const KUBECTL_IMAGE = getImage(__dirname, 1);

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

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

await using kubectlContainer = await new GenericContainer("rancher/kubectl:v1.31.2")
await using kubectlContainer = await new GenericContainer(KUBECTL_IMAGE)
.withNetwork(network)
.withCopyContentToContainer([{ content: kubeConfig, target: "/home/kubectl/.kube/config" }])
.withCommand(["get", "namespaces"])
Expand Down
1 change: 1 addition & 0 deletions packages/modules/localstack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
FROM localstack/localstack:4.6.0
FROM amazon/aws-cli:2.7.27
3 changes: 2 additions & 1 deletion packages/modules/localstack/src/localstack-container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
import { LOCALSTACK_PORT, LocalstackContainer } from "./localstack-container";

const IMAGE = getImage(__dirname);
const AWSCLI_IMAGE = getImage(__dirname, 1);

const runAwsCliAgainstDockerNetworkContainer = async (
command: string,
Expand Down Expand Up @@ -47,7 +48,7 @@ describe("LocalStackContainer", { timeout: 180_000 }, () => {
.withEnvironment({ SQS_ENDPOINT_STRATEGY: "path" })
.start();

await using awsCliInDockerNetwork = await new GenericContainer("amazon/aws-cli:2.7.27")
await using awsCliInDockerNetwork = await new GenericContainer(AWSCLI_IMAGE)
.withNetwork(network)
.withEntrypoint(["bash"])
.withCommand(["-c", "sleep infinity"])
Expand Down
22 changes: 1 addition & 21 deletions packages/modules/neo4j/src/neo4j-container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,6 @@ describe("Neo4jContainer", { timeout: 180_000 }, () => {
// }
});

// v5DefaultPassword {
it("should connect to neo4j:v5 with default password", async () => {
await using container = await new Neo4jContainer("neo4j:5.23.0").start();
const driver = neo4j.driver(
container.getBoltUri(),
neo4j.auth.basic(container.getUsername(), container.getPassword())
);

const session = driver.session();
const personName = "Chris";
const result = await session.run("CREATE (a:Person {name: $name}) RETURN a", { name: personName });
const singleRecord = result.records[0];
const node = singleRecord.get(0);
expect(node.properties.name).toBe(personName);

await session.close();
await driver.close();
});
// }

it("should connect with custom password", async () => {
// setPassword {
await using container = await new Neo4jContainer(IMAGE).withPassword("xyz1234@!").start();
Expand Down Expand Up @@ -88,7 +68,7 @@ describe("Neo4jContainer", { timeout: 180_000 }, () => {

it("should work with plugin list", async () => {
// pluginsList {
await using container = await new Neo4jContainer("neo4j:5.26.5")
await using container = await new Neo4jContainer(IMAGE)
.withPlugins([Neo4jPlugin.APOC_EXTENDED, Neo4jPlugin.GRAPH_DATA_SCIENCE])
.withStartupTimeout(120_000)
.start();
Expand Down
1 change: 1 addition & 0 deletions packages/modules/redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
FROM redis:8.0
FROM redis/redis-stack-server:7.4.0-v4
5 changes: 2 additions & 3 deletions packages/modules/redis/src/redis-container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getImage } from "../../../testcontainers/src/utils/test-helper";
import { RedisContainer } from "./redis-container";

const IMAGE = getImage(__dirname);
const REDISSTACK_IMAGE = getImage(__dirname, 1);

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

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

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