Remove CONTAINER_NAMESPACE, it wasn't the solution.
This commit is contained in:
parent
b98e80f687
commit
79184e70af
|
@ -94,7 +94,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DEBUG: testcontainers,testcontainers:exec,testcontainers:build,testcontainers:pull
|
DEBUG: testcontainers,testcontainers:exec,testcontainers:build,testcontainers:pull
|
||||||
REUSE_CONTAINERS: true
|
REUSE_CONTAINERS: true
|
||||||
CONTAINER_NAMESPACE: test-libraries
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -154,7 +153,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DEBUG: testcontainers,testcontainers:exec,testcontainers:build,testcontainers:pull
|
DEBUG: testcontainers,testcontainers:exec,testcontainers:build,testcontainers:pull
|
||||||
REUSE_CONTAINERS: true
|
REUSE_CONTAINERS: true
|
||||||
CONTAINER_NAMESPACE: test-server
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
@ -38,12 +38,6 @@ export default async function setup() {
|
||||||
couchdb = couchdb.withReuse()
|
couchdb = couchdb.withReuse()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.CONTAINER_NAMESPACE) {
|
|
||||||
couchdb = couchdb.withLabels({
|
|
||||||
"org.testcontainers.namespace": process.env.CONTAINER_NAMESPACE,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
await couchdb.start()
|
await couchdb.start()
|
||||||
} finally {
|
} finally {
|
||||||
if (process.env.REUSE_CONTAINERS) {
|
if (process.env.REUSE_CONTAINERS) {
|
||||||
|
|
|
@ -23,22 +23,12 @@ function getTestcontainers(): ContainerInfo[] {
|
||||||
// We use --format json to make sure the output is nice and machine-readable,
|
// We use --format json to make sure the output is nice and machine-readable,
|
||||||
// and we use --no-trunc so that the command returns full container IDs so we
|
// and we use --no-trunc so that the command returns full container IDs so we
|
||||||
// can filter on them correctly.
|
// can filter on them correctly.
|
||||||
let containers = execSync("docker ps --format json --no-trunc")
|
return execSync("docker ps --format json --no-trunc")
|
||||||
.toString()
|
.toString()
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.filter(x => x.length > 0)
|
.filter(x => x.length > 0)
|
||||||
.map(x => JSON.parse(x) as ContainerInfo)
|
.map(x => JSON.parse(x) as ContainerInfo)
|
||||||
.filter(x => x.Labels.includes("org.testcontainers=true"))
|
.filter(x => x.Labels.includes("org.testcontainers=true"))
|
||||||
|
|
||||||
if (process.env.CONTAINER_NAMESPACE) {
|
|
||||||
containers = containers.filter(x =>
|
|
||||||
x.Labels.includes(
|
|
||||||
`org.testcontainers.namespace=${process.env.CONTAINER_NAMESPACE}`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return containers
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getContainerByImage(image: string) {
|
export function getContainerByImage(image: string) {
|
||||||
|
|
|
@ -67,12 +67,6 @@ export async function rawQuery(ds: Datasource, sql: string): Promise<any> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function startContainer(container: GenericContainer) {
|
export async function startContainer(container: GenericContainer) {
|
||||||
if (process.env.CONTAINER_NAMESPACE) {
|
|
||||||
container = container.withLabels({
|
|
||||||
"org.testcontainers.namespace": process.env.CONTAINER_NAMESPACE,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.REUSE_CONTAINERS) {
|
if (process.env.REUSE_CONTAINERS) {
|
||||||
container = container.withReuse()
|
container = container.withReuse()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue