20 lines
872 B
JavaScript
20 lines
872 B
JavaScript
import assert from "node:assert/strict";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, it } from "vitest";
|
|
|
|
const scriptsDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
const source = fs.readFileSync(path.join(scriptsDirectory, "verify-identity-invite-migration.sh"), "utf8");
|
|
|
|
describe("identity/invite migration fixture isolation", () => {
|
|
it("tracks Docker's unique container ID instead of assigning a shared runner name", () => {
|
|
assert.match(source, /CONTAINER_ID=""/u);
|
|
assert.match(source, /CONTAINER_ID="\$\(docker run -d/u);
|
|
assert.doesNotMatch(source, /--name|CONTAINER_NAME/u);
|
|
assert.match(source, /docker rm -f "\$CONTAINER_ID"/u);
|
|
assert.match(source, /docker port "\$CONTAINER_ID"/u);
|
|
assert.match(source, /docker exec "\$CONTAINER_ID"/u);
|
|
});
|
|
});
|