armed-box-updates: guard-armed boxes can take a release by the ruled re-arm. Cherry-picks 8376a468 (rootaws: an inherited disabled sentinel is not an override) and 8a313548 (hostfloor: a guarded run returns stdout only) from claim-empty-cohort-done, Astra-reviewed there; census-ruling-claim-rootaws-sentinel, confirmed for main by platform-1c. For v0.28.5.
Squashed from armed-box-updates into main.
6 files changed,
+120
−2
internal/hostfloor/image_linux.go+17 −1internal/hostfloor/runimage_linux_test.go+39 −0internal/provision/plan14_root_reads_test.go+9 −0internal/provision/testdata/plan14-root-reads-armed-box-updates.tsv+7 −0internal/rootaws/environment.go+10 −1internal/rootaws/environment_test.go+38 −0
CI passed — run details
CI log
=== gate ===
cd launchctx && go vet ./... && go test ./... -count=1
ok amadan.net/carlos/platform.git/launchctx 0.011s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
go vet ./...
gofmt -l .: clean
go test ./... -count=1 -timeout 30m
ok github.com/carlosframework/platform 317.006s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 2.703s
ok github.com/carlosframework/platform/cmd/moveprobe 92.214s
ok github.com/carlosframework/platform/cmd/zddprobe 0.705s
ok github.com/carlosframework/platform/internal/activator 250.628s
ok github.com/carlosframework/platform/internal/agentsock 0.016s
ok github.com/carlosframework/platform/internal/alerting 0.003s
ok github.com/carlosframework/platform/internal/analytics 0.022s
ok github.com/carlosframework/platform/internal/appconfig 2.452s
ok github.com/carlosframework/platform/internal/apperr 0.070s
ok github.com/carlosframework/platform/internal/applog 0.133s
ok github.com/carlosframework/platform/internal/awsinv 0.004s
ok github.com/carlosframework/platform/internal/boxchoice 0.004s
ok github.com/carlosframework/platform/internal/boxid 0.824s
? github.com/carlosframework/platform/internal/boxid/boxidtest [no test files]
? github.com/carlosframework/platform/internal/boxid/internal/signtest [no test files]
ok github.com/carlosframework/platform/internal/boxvolumes 0.008s
ok github.com/carlosframework/platform/internal/caps 0.012s
ok github.com/carlosframework/platform/internal/certwarm 0.002s
ok github.com/carlosframework/platform/internal/cgroup 0.694s
ok github.com/carlosframework/platform/internal/changelog 0.325s
ok github.com/carlosframework/platform/internal/claimactivation 0.780s
ok github.com/carlosframework/platform/internal/clamd 0.054s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/console 415.627s
? github.com/carlosframework/platform/internal/controlname [no test files]
? github.com/carlosframework/platform/internal/controlsock [no test files]
ok github.com/carlosframework/platform/internal/dbdoor 5.795s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.009s
ok github.com/carlosframework/platform/internal/dbverify 0.004s
ok github.com/carlosframework/platform/internal/dnsrec 0.002s
ok github.com/carlosframework/platform/internal/docsite 0.005s
ok github.com/carlosframework/platform/internal/domains 2.372s
ok github.com/carlosframework/platform/internal/doorkey 0.006s
ok github.com/carlosframework/platform/internal/economics 0.003s
ok github.com/carlosframework/platform/internal/edge 44.888s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.008s
ok github.com/carlosframework/platform/internal/fleetapi 0.130s
ok github.com/carlosframework/platform/internal/gate 1.658s
ok github.com/carlosframework/platform/internal/genselect 0.015s
ok github.com/carlosframework/platform/internal/geo 0.014s
ok github.com/carlosframework/platform/internal/geoip 0.030s
ok github.com/carlosframework/platform/internal/historyreadback 0.183s
ok github.com/carlosframework/platform/internal/host 185.572s
ok github.com/carlosframework/platform/internal/hostactors 5.760s
ok github.com/carlosframework/platform/internal/hostactors/awsmembership 0.016s
ok github.com/carlosframework/platform/internal/hostbox 2.635s
ok github.com/carlosframework/platform/internal/hostclaim 0.614s
ok github.com/carlosframework/platform/internal/hostenv 0.016s
ok github.com/carlosframework/platform/internal/hostevidence 0.016s
ok github.com/carlosframework/platform/internal/hostexec 4.809s
ok github.com/carlosframework/platform/internal/hostfence 0.042s
ok github.com/carlosframework/platform/internal/hostfiles 10.450s
ok github.com/carlosframework/platform/internal/hostfloor 0.016s
ok github.com/carlosframework/platform/internal/hostguard 1.035s
ok github.com/carlosframework/platform/internal/hostops 1.661s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.017s
ok github.com/carlosframework/platform/internal/hostquarantine 0.016s
ok github.com/carlosframework/platform/internal/hostrelocate 0.485s
ok github.com/carlosframework/platform/internal/hostresolve 0.150s
ok github.com/carlosframework/platform/internal/hostwrite 0.017s
ok github.com/carlosframework/platform/internal/infraview 0.017s
ok github.com/carlosframework/platform/internal/instancectl 5.240s
ok github.com/carlosframework/platform/internal/instanceexec 2.772s
ok github.com/carlosframework/platform/internal/instancefs 0.021s
ok github.com/carlosframework/platform/internal/instancekey 0.016s
ok github.com/carlosframework/platform/internal/instanceupdates 0.022s
ok github.com/carlosframework/platform/internal/layout 1.567s
ok github.com/carlosframework/platform/internal/lbhealth 0.004s
ok github.com/carlosframework/platform/internal/lease 9.884s
ok github.com/carlosframework/platform/internal/lease/leasetest 0.356s
ok github.com/carlosframework/platform/internal/ledger 0.023s
ok github.com/carlosframework/platform/internal/mail 0.181s
ok github.com/carlosframework/platform/internal/maintenance 0.083s
ok github.com/carlosframework/platform/internal/maintenanceexec 5.523s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.084s
ok github.com/carlosframework/platform/internal/metrics 0.005s
ok github.com/carlosframework/platform/internal/moves 21.117s
ok github.com/carlosframework/platform/internal/moves/archive 0.783s
ok github.com/carlosframework/platform/internal/objstore 0.234s
ok github.com/carlosframework/platform/internal/ops 0.184s
ok github.com/carlosframework/platform/internal/park 0.235s
ok github.com/carlosframework/platform/internal/privatefile 0.004s
ok github.com/carlosframework/platform/internal/provision 33.071s
ok github.com/carlosframework/platform/internal/publicrelease 0.010s
? github.com/carlosframework/platform/internal/regionname [no test files]
ok github.com/carlosframework/platform/internal/registry 5.463s
ok github.com/carlosframework/platform/internal/relay 7.231s
ok github.com/carlosframework/platform/internal/release 23.675s
ok github.com/carlosframework/platform/internal/rollout 3.669s
ok github.com/carlosframework/platform/internal/rolloutwords 0.003s
ok github.com/carlosframework/platform/internal/rootaws 0.007s
ok github.com/carlosframework/platform/internal/rootparticipation 0.058s
ok github.com/carlosframework/platform/internal/rootstate 0.027s
ok github.com/carlosframework/platform/internal/runs 0.572s
ok github.com/carlosframework/platform/internal/s3compat 0.004s
ok github.com/carlosframework/platform/internal/safefile 0.004s
ok github.com/carlosframework/platform/internal/schedule 2.488s
ok github.com/carlosframework/platform/internal/seeds 0.013s
ok github.com/carlosframework/platform/internal/sim/hostlife 9.160s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 3.620s
ok github.com/carlosframework/platform/internal/status 0.065s
ok github.com/carlosframework/platform/internal/steering 0.006s
ok github.com/carlosframework/platform/internal/stopevidence 0.302s
ok github.com/carlosframework/platform/internal/svcrole 0.002s
ok github.com/carlosframework/platform/internal/telemetry 0.004s
ok github.com/carlosframework/platform/internal/termfence 0.004s
ok github.com/carlosframework/platform/internal/tunnelclient 0.004s
ok github.com/carlosframework/platform/internal/unixdial 0.002s
ok github.com/carlosframework/platform/internal/updatewords 0.004s
ok github.com/carlosframework/platform/internal/usage 0.004s
ok github.com/carlosframework/platform/internal/version 0.002s
ok github.com/carlosframework/platform/internal/vet 1.563s
=== cross ===
--- shard 0 of 5 ---
cross-compiling darwin/arm64
--- shard 1 of 5 ---
cross-compiling darwin/amd64
--- shard 2 of 5 ---
cross-compiling linux/arm64
linux/arm64 carlos binary: 49807522 bytes (ceiling 52000000)
--- shard 3 of 5 ---
cross-compiling windows/amd64
--- shard 4 of 5 ---
cross-compiling windows/arm64
=== minio-contract ===
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
minio: cached, digest verified
mc: cached, digest verified
minio healthy on 127.0.0.1:20999
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
buckets and scoped user ready
=== RUN TestDeliveredContractMinio
=== RUN TestDeliveredContractMinio/put
=== RUN TestDeliveredContractMinio/get_round-trips_the_body
=== RUN TestDeliveredContractMinio/list_shows_the_key
=== RUN TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN TestDeliveredContractMinio/delete_removes_it
=== RUN TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.02s)
--- PASS: TestDeliveredContractMinio/put (0.00s)
--- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
--- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
--- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.01s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
--- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.022s
=== RUN TestT4StorageProbeMinio
2026/10/20 15:35:20 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18E046D257348E6C, HostID: 7c420053e0fbcd7f41653fdd92ffa2802c903d05303b1aa15adc2e8bb65d183f, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.00s)
PASS
ok github.com/carlosframework/platform/internal/host 0.021s
minio contract: PASS
diff --git a/internal/hostfloor/image_linux.go b/internal/hostfloor/image_linux.go| index b048ac82e..965b02f14 100644 |
| --- a/internal/hostfloor/image_linux.go |
| +++ b/internal/hostfloor/image_linux.go |
| @@ -10,6 +10,7 @@ import ( |
| "os/exec" |
| "path/filepath" |
| "strconv" |
| + "strings" |
| "syscall" |
| ) |
| @@ -68,9 +69,24 @@ func (d Disk) Run(ctx context.Context, path, platform string, args ...string) (s |
| if _, err = d.VerifyFile(f, platform); err != nil { |
| return "", err |
| } |
| + return runImage(ctx, f, args...) |
| +} |
| + |
| +// runImage runs the verified image open as f and returns its stdout only. |
| +// A caller parses that output (a version line, a JSON plan), so anything |
| +// the image writes to stderr, such as progress or an alert, must not be |
| +// mixed into it; stderr is kept for the error when the run fails. |
| +func runImage(ctx context.Context, f *os.File, args ...string) (string, error) { |
| cmd := exec.CommandContext(ctx, "/proc/self/fd/3", args...) |
| cmd.ExtraFiles = []*os.File{f} |
| - out, err := cmd.CombinedOutput() |
| + var stderr strings.Builder |
| + cmd.Stderr = &stderr |
| + out, err := cmd.Output() |
| + if err != nil { |
| + if msg := strings.TrimSpace(stderr.String()); msg != "" { |
| + err = fmt.Errorf("%w: %s", err, msg) |
| + } |
| + } |
| return string(out), err |
| } |
| func ExecutingHash() (string, error) { |
diff --git a/internal/hostfloor/runimage_linux_test.go b/internal/hostfloor/runimage_linux_test.go| new file mode 100644 |
| index 000000000..839560401 |
| --- /dev/null |
| +++ b/internal/hostfloor/runimage_linux_test.go |
| @@ -0,0 +1,39 @@ |
| +//go:build linux |
| + |
| +package hostfloor |
| + |
| +import ( |
| + "context" |
| + "os" |
| + "path/filepath" |
| + "strings" |
| + "testing" |
| +) |
| + |
| +// A guarded run returns the image's stdout only. A candidate that writes |
| +// progress or an alert to stderr must not corrupt the version or JSON the |
| +// updater parses from stdout (an armed box refused every router update that |
| +// way); stderr still explains a failure. |
| +func TestRunImageReturnsStdoutOnly(t *testing.T) { |
| + dir := t.TempDir() |
| + script := filepath.Join(dir, "img") |
| + if err := os.WriteFile(script, []byte("#!/bin/sh\necho noise >&2\necho '{\"ok\":true}'\n[ \"$1\" = fail ] && { echo why >&2; exit 3; }\nexit 0\n"), 0o755); err != nil { |
| + t.Fatal(err) |
| + } |
| + f, err := os.Open(script) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer f.Close() |
| + out, err := runImage(context.Background(), f, "ok") |
| + if err != nil || out != "{\"ok\":true}\n" { |
| + t.Fatalf("out %q err %v", out, err) |
| + } |
| + if _, err = f.Seek(0, 0); err != nil { |
| + t.Fatal(err) |
| + } |
| + _, err = runImage(context.Background(), f, "fail") |
| + if err == nil || !strings.Contains(err.Error(), "why") { |
| + t.Fatalf("failure lost its stderr: %v", err) |
| + } |
| +} |
diff --git a/internal/provision/plan14_root_reads_test.go b/internal/provision/plan14_root_reads_test.go| index 9ff2cb52b..95983645d 100644 |
| --- a/internal/provision/plan14_root_reads_test.go |
| +++ b/internal/provision/plan14_root_reads_test.go |
| @@ -972,6 +972,15 @@ func TestPlan14RootReadCensus(t *testing.T) { |
| t.Fatal(err) |
| } |
| seal = "393e7f456d8f02b2eee0c683880e5f7bf696b6ee0c87f20e5c113434065bec29" |
| + // Census overlay armed-box-updates (cherry-picked from the claim branch |
| + // for v0.28.5): rootaws's scrub treats its own inherited disabled-file |
| + // sentinels as no override, and hostfloor's guarded run returns stdout |
| + // only, so a guard-armed box's updater can read a candidate's version and |
| + // plan. Loaded last, under census-ruling-claim-rootaws-sentinel |
| + // (platform-1c). No legacy row; the seal stands. |
| + if err = loadRootReadInventory(filepath.Join(root, "internal/provision/testdata/plan14-root-reads-armed-box-updates.tsv"), &inv, true); err != nil { |
| + t.Fatal(err) |
| + } |
| errs := append(compareRootReads(got, inv), checkRootReadLegacy(inv, seal)...) |
| errs = append(errs, checkRootReadDeclarations(got, inv)...) |
| if len(errs) > 0 { |
diff --git a/internal/provision/testdata/plan14-root-reads-armed-box-updates.tsv b/internal/provision/testdata/plan14-root-reads-armed-box-updates.tsv| new file mode 100644 |
| index 000000000..b2fadcab0 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-armed-box-updates.tsv |
| @@ -0,0 +1,7 @@ |
| +# Census overlay armed-box-updates (cherry-picks 8376a468 and 8a313548 from claim-empty-cohort-done onto main for v0.28.5; rows and ruling census-ruling-claim-rootaws-sentinel, confirmed for main by platform-1c, 2026-10-20). Only the rootaws and hostfloor parts apply on main. |
| +# Census overlay claim-rootaws-sentinel (a scrubbed root parent's own disabled shared-file sentinels are not an override in a root child, so the child's scrub stays silent; found by platform-d8's deployment harness at G4: a guard-armed box refused every router update because the candidate's version printed the ALERT into the guarded updater's combined output), loaded LAST, after claim-empty-cohort-fix2. RULED (platform-1e, 2026-10-20): accepted. Envelope only: ScrubEnvironment has no classified root-read unit; no row changes and the seal stands. |
| +@coverage internal/rootaws ad641674b84d17a9f6a7b1acb4cf88b68cc2a882812a28c8f622d4fd9616b470 |
| +# Also (harness G4, parent side, same ruling): hostfloor's guarded run returns the image's stdout only through runImage (new), so stderr progress or an alert cannot corrupt the version or plan an updater parses; Disk.Run's exec site moved into runImage at its class, and Disk.Run's row is retired. |
| +@coverage internal/hostfloor ba748a60d9bd7a55d2d3c4a2fe17fc619c23aa2e813a88b164dff47e04a41a1f |
| +@remove internal/hostfloor/image_linux.go Disk.Run |
| +internal/hostfloor/image_linux.go runImage authority F,J4 rev3=census-ruling-claim-rootaws-sentinel;identity=root (the system updater and root's apply through hostfloor.Disk.Run on a guard-armed box);basis=root-input: the exec of the verified, protected image Disk.Run opened and checked, moved unchanged from Disk.Run; stdout is returned and stderr kept only for the error file:CommandContext@89 fbf4a73db9e71f8deefa8d56ece729f489f84689d064e2475f5551a823d6fa59 |
diff --git a/internal/rootaws/environment.go b/internal/rootaws/environment.go| index 343ea793b..6023800b3 100644 |
| --- a/internal/rootaws/environment.go |
| +++ b/internal/rootaws/environment.go |
| @@ -57,7 +57,7 @@ func scrubEnvironment(euid int) { |
| } |
| } |
| for _, key := range keys { |
| - if _, set := os.LookupEnv(key); set { |
| + if value, set := os.LookupEnv(key); set && !inheritedSentinel(key, value) { |
| changed = true |
| } |
| _ = os.Unsetenv(key) |
| @@ -77,6 +77,15 @@ func scrubEnvironment(euid int) { |
| } |
| } |
| +// inheritedSentinel reports a shared-file key that already holds the value |
| +// this scrub sets: a root child of a scrubbed root parent inherits it, and |
| +// that is not an override. Alerting on it would put the alert on the child's |
| +// stderr, where a guarded updater reading `version` with combined output |
| +// refuses the candidate. |
| +func inheritedSentinel(key, value string) bool { |
| + return (key == "AWS_CONFIG_FILE" || key == "AWS_SHARED_CREDENTIALS_FILE") && value == disabledSharedFile |
| +} |
| + |
| // imdsHosts are the IPv4 and IPv6 instance metadata addresses. |
| var imdsHosts = []string{"169.254.169.254", "fd00:ec2::254"} |
diff --git a/internal/rootaws/environment_test.go b/internal/rootaws/environment_test.go| index 3d4dc9774..5bf35f28b 100644 |
| --- a/internal/rootaws/environment_test.go |
| +++ b/internal/rootaws/environment_test.go |
| @@ -149,3 +149,41 @@ func TestScrubEnvironmentKeepsProxyButBypassesIMDS(t *testing.T) { |
| t.Fatal("non-root NO_PROXY changed") |
| } |
| } |
| + |
| +// A root child of a root process inherits the parent's own disabled shared |
| +// files. That is not an override: it must stay silent, or a guarded updater |
| +// that reads a candidate's `version` with its output combined refuses the |
| +// candidate (an armed box could then take no router update at all). |
| +func TestScrubEnvironmentInheritedSentinelIsNotAnOverride(t *testing.T) { |
| + for _, key := range rootScrubbedEnvironment { |
| + t.Setenv(key, "") |
| + os.Unsetenv(key) |
| + } |
| + t.Setenv("AWS_CONFIG_FILE", disabledSharedFile) |
| + t.Setenv("AWS_SHARED_CREDENTIALS_FILE", disabledSharedFile) |
| + var logs bytes.Buffer |
| + old := log.Writer() |
| + log.SetOutput(&logs) |
| + defer log.SetOutput(old) |
| + scrubEnvironment(0) |
| + if logs.Len() != 0 { |
| + t.Fatalf("alert for the inherited sentinel: %q", logs.String()) |
| + } |
| + if os.Getenv("AWS_CONFIG_FILE") != disabledSharedFile || os.Getenv("AWS_SHARED_CREDENTIALS_FILE") != disabledSharedFile { |
| + t.Fatal("shared files not disabled for root") |
| + } |
| + // Any other value for either key is still an override. |
| + for _, key := range []string{"AWS_CONFIG_FILE", "AWS_SHARED_CREDENTIALS_FILE"} { |
| + logs.Reset() |
| + t.Setenv("AWS_CONFIG_FILE", disabledSharedFile) |
| + t.Setenv("AWS_SHARED_CREDENTIALS_FILE", disabledSharedFile) |
| + t.Setenv(key, disabledSharedFile+"x") |
| + scrubEnvironment(0) |
| + if strings.Count(logs.String(), "ALERT:") != 1 { |
| + t.Fatalf("%s set to another file did not alert: %q", key, logs.String()) |
| + } |
| + if os.Getenv(key) != disabledSharedFile { |
| + t.Fatalf("%s not reset to the sentinel", key) |
| + } |
| + } |
| +} |