morgana: row 244: the fault activation gets the mock marker too, so only its wrong expectation refuses and M-F can fail a test
This commit is contained in:
1 parent
47148991b4
commit
81e037d20d
2 files changed
+8
-4
No files matched your search
@@ -144,8 +144,10 @@ spawnEnv and MOSAIC_ADAPTER, `test-release.sh:61` config. All hold.
|
||||
`MOSAIC_LIVE_PROVIDER` isn't on cleanEnv's keep list, so the lane can't request live cases.
|
||||
- `scripts/test-release.sh`: exports a `$SANDBOX/pi/auth.json` fixture (`{}`, `chmod 600` after the
|
||||
write, exits 1 if the write fails). The config adds `"adapter":"mock"` with the ruling A comment. The
|
||||
healthy and repeat activations run with `MOSAIC_MOCK_RESPONSE=MOSAIC_HELLO_OK`. The fault activation
|
||||
has no mock response, and its `MOSAIC_FAULT_<n>` expectation can't match either way.
|
||||
fault, healthy and repeat activations all run with `MOSAIC_MOCK_RESPONSE=MOSAIC_HELLO_OK`, so the
|
||||
fault activation refuses only because its `MOSAIC_FAULT_<n>` expectation is wrong. (Correction,
|
||||
before any run: the first build gave the fault activation no mock response. The mock then answered
|
||||
empty, which fails any expectation, so M-F would have survived. Fixed in the follow-up commit.)
|
||||
- `scripts/test-task.sh`: same fixture, exported only when `MOSAIC_LIVE_PROVIDER` isn't 1, so an
|
||||
operator's live run keeps their own `PI_AUTH_FILE` (or Compose's default). Ruling C (a) and (b) as
|
||||
above. The section header changes from "live: real runs" to "run records through the mock adapter",
|
||||
@@ -194,7 +196,8 @@ real pi credential and a real `release.sh activate`, and records both results on
|
||||
|
||||
Mutants (each must fail a named test; on Sage's slot):
|
||||
- M-F: `release.sh` health_check fault task `expectExact` forced to `MOSAIC_HELLO_OK`. Fails
|
||||
test-release.sh "fault-injected activation refuses", and test 3's OK match.
|
||||
test-release.sh "fault-injected activation refuses", and test 3's OK match. This needs the fault
|
||||
activation's `MOSAIC_MOCK_RESPONSE=MOSAIC_HELLO_OK` (see the correction above).
|
||||
- M-G: the `laneAuthFile(env,run)` call removed from guardDocker. Fails test 1.
|
||||
- M-A: `,"adapter":"mock"` removed from test-release's config. Fails test 3 (adapter set is pi).
|
||||
- M-L: the `PI_AUTH_FILE` key removed from cleanEnv. Fails test 2.
|
||||
|
||||
@@ -74,7 +74,8 @@ EOF
|
||||
[ ! -e "$SANDBOX/data/state/active.json" ] \
|
||||
&& check "status created no pointer" 0 || check "status created no pointer" 1
|
||||
|
||||
expect_exit "fault-injected activation refuses" 1 -- scripts/release.sh activate --fault-injection
|
||||
# The mock gives the right marker, so only the fault's wrong expectation refuses.
|
||||
expect_exit "fault-injected activation refuses" 1 -- env MOSAIC_MOCK_RESPONSE=MOSAIC_HELLO_OK scripts/release.sh activate --fault-injection
|
||||
[ ! -e "$SANDBOX/data/state/active.json" ] \
|
||||
&& check "refused activation wrote no pointer" 0 || check "refused activation wrote no pointer" 1
|
||||
if [ -f "$SANDBOX/data/state/activation-log.jsonl" ]; then
|
||||
|
||||
Reference in new issue
Block a user