Skip to content

Commit 2e5bc01

Browse files
committed
test(e2e): preserve provider fixture trust bundle
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 45bb948 commit 2e5bc01

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎e2e/rust/tests/provider_readiness.rs‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,14 +1369,15 @@ async fn acknowledged_provider_changes_apply_to_fresh_clients_and_revoke_retaine
13691369
"FROM {base}\nUSER root\nCOPY client.py /opt/provider-readiness-client.py\nUSER sandbox\n"
13701370
)).map_err(|_| "could not write fixture Dockerfile")?;
13711371
let supervisor_dockerfile = context.join("Dockerfile.supervisor");
1372-
// Outbound TLS belongs to the separate supervisor. Replace the system
1373-
// bundle in this test-only image with the fixture CA without invoking a
1374-
// shell: the production supervisor image is deliberately distroless.
1375-
// The supervisor retains its compiled Mozilla roots and delivers this
1376-
// fixture CA together with the generated sandbox CA to the workload.
1372+
// Outbound TLS belongs to the separate supervisor. Assemble its combined
1373+
// public trust bundle in the shell-capable workload image because the
1374+
// final supervisor image is intentionally distroless. Preserve the final
1375+
// image's user setting: Docker's archive upload applies an explicit image
1376+
// user to the supervisor's private bootstrap files.
13771377
std::fs::write(&supervisor_dockerfile, format!(
1378-
"FROM {}\nCOPY fixture-ca.crt /etc/ssl/certs/ca-certificates.crt\n",
1379-
gateway_config.supervisor_image
1378+
"FROM {} AS supervisor\nFROM {base} AS trust-bundle\nUSER 0\nCOPY --from=supervisor /etc/ssl/certs/ca-certificates.crt /tmp/ca-certificates.crt\nCOPY fixture-ca.crt /tmp/readiness-fixture-ca.crt\nRUN [\"/usr/bin/python3\", \"-c\", \"from pathlib import Path; bundle = Path('/tmp/ca-certificates.crt'); bundle.write_bytes(bundle.read_bytes() + Path('/tmp/readiness-fixture-ca.crt').read_bytes())\"]\nFROM {}\nCOPY --from=trust-bundle /tmp/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt\n",
1379+
gateway_config.supervisor_image,
1380+
gateway_config.supervisor_image,
13801381
)).map_err(|_| "could not write fixture supervisor Dockerfile")?;
13811382
image
13821383
.build(&dockerfile, &context, "build workload fixture image")

0 commit comments

Comments
 (0)