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
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ RUN set -eu; \
exit 1; \
fi; \
}; \
check /opt/srb/deps.txt 8c21fb43b03e006d; \
check /root/.m2/settings.xml dd1e2f901e381beb; \
check /root/.gradle/init.d/srb-offline.gradle 9f1bb633e5ee6759; \
check /opt/srb/deps.txt 1fe5a5321f4b4264; \
check /root/.m2/settings.xml c649f180bd8671cf; \
check /root/.gradle/init.d/srb-offline.gradle 3ffe9bd34097ec28; \
echo "shared inputs: three files, digests match the agent image"

# ---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
# maven-install-plugin:3.1.2's own dependencies. Reached only by `mvn deploy`,
# which runs the install phase before the deploy phase, so a closure built for
# `mvn package` does not hold them and the publish configuration cannot build.
#
# maven-javadoc-plugin:3.4.1's own dependencies, for the same reason and with one
# trap. The release profile binds it, so `mvn deploy` resolves the plugin before
# it executes any goal -- which means -Dmaven.javadoc.skip=true cannot rescue an
# incomplete closure: `skip` is read by the goal, and a plugin whose descriptor
# will not resolve never reaches its goal. The trap is the classifier. Upstream
# renamed sisu-guice's AOP-free variant `noaop` -> `no_aop` between 2.x and 3.x,
# so the 2.1.7 line below and the 3.2.3 one spell it differently and a fetcher
# run with -Dtransitive=false takes the manifest literally. Both spellings are
# required: 2.1.7:noaop for the older plugin ancestry, 3.2.3:no_aop here.
aopalliance:aopalliance:1.0:jar
aopalliance:aopalliance:1.0:pom
asm:asm-parent:3.3.1:pom
Expand Down Expand Up @@ -774,6 +784,7 @@ org.sonatype.sisu.inject:guice-plexus:1.4.2:pom
org.sonatype.sisu:sisu-guice:2.1.7:jar:noaop
org.sonatype.sisu:sisu-guice:3.1.0:pom
org.sonatype.sisu:sisu-guice:3.2.3:jar
org.sonatype.sisu:sisu-guice:3.2.3:jar:no_aop
org.sonatype.sisu:sisu-guice:3.2.3:pom
org.sonatype.sisu:sisu-inject-bean:1.4.2:jar
org.sonatype.sisu:sisu-inject-plexus:1.4.2:jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ RUN set -eu; cd /tests/behavioural; \
printf '%s\n' "$out" | tail -20 >&2; \
echo "FATAL: collection failed" >&2; exit 1; }; \
got=$(printf '%s\n' "$out" | awk -F': ' '/: [0-9]+$/{s+=$2} END{print s+0}'); \
[ "$got" = "11510" ] || { \
[ "$got" = "11397" ] || { \
printf '%s\n' "$out" | tail -5 >&2; \
echo "FATAL: collected ${got:-no} tests, expected 11510" >&2; exit 1; }; \
echo "FATAL: collected ${got:-no} tests, expected 11397" >&2; exit 1; }; \
echo "the eleven pytest modules collect $got tests"

ENV SRB_REPO=/workspace/repo \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class Invocation:

# Runtime failures, which exit 1 rather than 2. Their messages name a path,
# so they are graded on the exit code and the substrings only.
Invocation(id="err-missing-path", argv=("/nonexistent-srb-path",),
# `rmb` here is frozen for the same reason as corpus.py's headers: this
# argv is part of fingerprint() and of the recorded capture.
Invocation(id="err-missing-path", argv=("/nonexistent-rmb-path",),
exact=False, contains=("Error",)),
Invocation(id="err-missing-tls-cert",
argv=("--tls-cert", "/nonexistent.pem",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -997,35 +997,42 @@ def error_cases(prefix: str) -> list[Case]:
),

# -- custom headers ----------------------------------------------------
#
# The `Rmb` spelling below is frozen, not stale. These strings are request
# inputs: they go into `fingerprint()`, and the server echoes them into the
# responses `data/responses.json.gz` recorded from State A. Renaming them --
# which a project-wide rename once did -- invalidates that capture and stops
# the stage building, for a token that names nothing and means nothing. Any
# new spelling requires a fresh capture; see `harness/capture.py`.
Session(
id="headers",
argv=("--header", "X-Srb-One:first",
"--header", "X-Srb-Two: second",
argv=("--header", "X-Rmb-One:first",
"--header", "X-Rmb-Two: second",
"--header", "Cache-Control:no-store",
"--header", "X-Srb-Empty:"),
"--header", "X-Rmb-Empty:"),
cases=(
Case(id="hd-root", path="/", body_mode="html",
headers_extra=("x-srb-one", "x-srb-two", "cache-control",
"x-srb-empty")),
headers_extra=("x-rmb-one", "x-rmb-two", "cache-control",
"x-rmb-empty")),
Case(id="hd-file", path="/test.txt",
headers_extra=("x-srb-one", "x-srb-two", "cache-control",
headers_extra=("x-rmb-one", "x-rmb-two", "cache-control",
"content-type", "etag")),
Case(id="hd-404", path="/nope", body_mode="html",
headers_extra=("x-srb-one", "cache-control"),
headers_extra=("x-rmb-one", "cache-control"),
note="the custom headers survive the error path"),
Case(id="hd-favicon", path="{favicon}",
headers_extra=("x-srb-one", "content-type")),
headers_extra=("x-rmb-one", "content-type")),
Case(id="hd-head", method="HEAD", path="/test.txt",
headers_extra=("x-srb-one", "x-srb-two")),
headers_extra=("x-rmb-one", "x-rmb-two")),
Case(id="hd-redirect", path="/dira", body_mode="shape",
headers_extra=("x-srb-one", "location")),
headers_extra=("x-rmb-one", "location")),
),
note="DefaultHeaders wraps everything, including errors and redirects",
),
Session(
id="headers-override",
argv=("--header", "Content-Type:application/x-srb",
"--header", "Server:srb-test"),
argv=("--header", "Content-Type:application/x-rmb",
"--header", "Server:rmb-test"),
cases=(
Case(id="hdo-file", path="/test.txt",
headers_extra=("content-type", "server"),
Expand All @@ -1038,7 +1045,7 @@ def error_cases(prefix: str) -> list[Case]:
# -- presentation ------------------------------------------------------
Session(
id="title",
argv=("--title", "SRB <fw05> & \"friends\""),
argv=("--title", "RMB <fw05> & \"friends\""),
cases=(
Case(id="ti-root", path="/", body_mode="html",
note="the title is HTML-escaped in <title> and in the header"),
Expand Down
Loading