Skip to content

Commit e9aaa96

Browse files
committed
test(e2e): account for verified image cache
1 parent 5993ff4 commit e9aaa96

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

  • test-suites/full-stack-compose/scripts

test-suites/full-stack-compose/scripts/runner.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -861,19 +861,23 @@ phase_upgrade() {
861861
assert_no_insecure_shortcuts
862862
save_vm_logs
863863
# dstack-kms runs in an inner container, whose stdout is not part of the CVM
864-
# serial log returned by VMM. Each KMS has a fresh data disk, so two 200 GETs
865-
# for the exact measured archive prove that both verifiers downloaded it.
864+
# serial log returned by VMM. Require an observed successful fetch of each
865+
# exact measured archive, but do not require one fetch per KMS: onboarding
866+
# deliberately copies durable KMS state and its verified-image cache. The
867+
# exact two-image allowlist asserted above, absence of disabled-verification
868+
# paths below, and successful key delivery to old/current-image guests prove
869+
# that the serving KMS accepted both images without assuming cache misses.
866870
local os_archive_gets
867871
os_archive_gets=$(grep -Fc \
868872
"GET /os/mr_${OS_IMAGE_HASH}.tar.gz HTTP/1.1\" 200" \
869873
"$WORK_DIR/artifacts-access.log" || true)
870-
(( os_archive_gets >= 2 )) \
871-
|| die "expected verified OS image downloads by both KMS versions, saw ${os_archive_gets}"
874+
(( os_archive_gets >= 1 )) \
875+
|| die "expected a verified current OS image archive download, saw ${os_archive_gets}"
872876
os_archive_gets=$(grep -Fc \
873877
"GET /os/mr_${OLD_OS_IMAGE_HASH}.tar.gz HTTP/1.1\" 200" \
874878
"$WORK_DIR/artifacts-access.log" || true)
875-
(( os_archive_gets >= 2 )) \
876-
|| die "expected v0.5.11 OS verification by both KMS versions, saw ${os_archive_gets}"
879+
(( os_archive_gets >= 1 )) \
880+
|| die "expected a verified v0.5.11 OS image archive download, saw ${os_archive_gets}"
877881
if grep -E 'Image verification is disabled|self-authorization is disabled' \
878882
"$WORK_DIR/kms-"*.vm.log; then
879883
die "KMS logs contain a forbidden disabled verification path"

0 commit comments

Comments
 (0)