mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
fix(image): take scheme-less health-check URLs, anchor the compose pin, say which tools left
This commit is contained in:
1 parent
fb143a2d47
commit
27b054d8c4
5 files changed
+28
-10
No files matched your search
@@ -92,7 +92,12 @@ describe("runtime package pins", () => {
|
||||
pg!.image,
|
||||
);
|
||||
expect(client, `a pinned major 18 image, not ${pg!.image}`).not.toBeNull();
|
||||
const db = /^\s*image:\s*postgres:(\d+\.\d+)-alpine$/m.exec(COMPOSE);
|
||||
// The `db` service's own image line, not the first postgres image in the
|
||||
// file: `db-upgrade` carries the previous major.
|
||||
const db =
|
||||
/^ {2}db:\n(?:(?! {2}\S).*\n)*? {4}image:\s*postgres:(\d+\.\d+)-alpine$/m.exec(
|
||||
COMPOSE,
|
||||
);
|
||||
expect(db, "the compose file pins the database").not.toBeNull();
|
||||
// One decision: a database minor bump moves the client with it.
|
||||
expect(client![1]).toBe(db![1]);
|
||||
|
||||
@@ -175,6 +175,12 @@ describe("wget shim", () => {
|
||||
expect((await wget(["--spider"])).code).toBe(2);
|
||||
});
|
||||
|
||||
it("takes a URL without a scheme, like busybox wget", async () => {
|
||||
const bare = base.replace(/^http:\/\//, "");
|
||||
expect((await wget(["-qO-", `${bare}/ok`])).code).toBe(0);
|
||||
expect((await wget(["-qO-", `${bare}/down`])).code).toBe(1);
|
||||
});
|
||||
|
||||
it("is what the image installs as wget", () => {
|
||||
const dockerfile = readSource("Dockerfile", "AS runner");
|
||||
const runner = dockerfile.slice(dockerfile.search(/^FROM .* AS runner$/m));
|
||||
|
||||
Reference in new issue
Block a user