Skip to content

Commit 13a6781

Browse files
Copilotnitrocode
andcommitted
test: clarify comments in error-propagation test and benchmark per code review
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> Agent-Logs-Url: https://github.com/cloudposse/atmos/sessions/93ee2135-1e5b-487d-94f5-e3af9cc1f548
1 parent ca85936 commit 13a6781

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

internal/exec/terraform_execute_helpers_workspace_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ func TestExecuteMainTerraformCommand_BareWorkspace_ReturnsNil(t *testing.T) {
181181
// error is propagated to the caller rather than being swallowed.
182182
//
183183
// Cross-platform approach: uses the test binary itself (os.Executable) with
184-
// _ATMOS_TEST_EXIT_ONE=1 to produce a portable exit-1 without depending on Unix-only
185-
// binaries like "false". TestMain in testmain_test.go intercepts this env var.
184+
// _ATMOS_TEST_EXIT_ONE=1 as the "terraform" command. TestMain in testmain_test.go
185+
// intercepts this env var and calls os.Exit(1) immediately — before the test runner
186+
// starts. The -test.run argument is irrelevant since TestMain exits before any test
187+
// selection happens, but it is included for documentation clarity.
186188
//
187189
// This test also acts as a contract test that ExecuteShellCommand correctly wraps
188190
// subprocess exit codes in errUtils.ExitCodeError: errors.As must succeed.

pkg/merge/merge_native_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,9 +908,10 @@ func BenchmarkMergeNative_TenInputs(b *testing.B) {
908908

909909
// BenchmarkMerge_ProductionScale simulates a realistic large-stack merge:
910910
// 10 inheritance layers, 25 top-level sections, nested maps, mixed lists, and
911-
// nested list-of-map-of-list (node_groups with per-group subnet lists) — the
912-
// last pattern exercises the full sliceDeepCopy and appendSlice code paths
913-
// with deeply nested structures representative of real Atmos stacks.
911+
// the nested list-of-map-of-list pattern (`node_groups` with per-group subnet lists).
912+
// The `node_groups` structure exercises the full sliceDeepCopy and appendSlice code
913+
// paths with deeply nested structures representative of real Atmos stacks (e.g.
914+
// EKS node groups with per-group subnet, label, and tag lists).
914915
// This supplements BenchmarkMergeNative_TenInputs which uses only 3 top-level keys.
915916
// Production Atmos stacks typically have 10–30 sections and 5–15 inheritance levels.
916917
//

0 commit comments

Comments
 (0)