Skip to content

Commit 405b5ca

Browse files
committed
test(commands): assert CommandName is set on TestBuildApplyRenderOptions
CommandName is read by engine.Render to format the FailIfMultiNodes error wording. The engine-side assertion (TestRenderFailIfMultiNodes_UsesCommandName) verifies Render does the right thing with whatever value it receives, but nothing was pinning that buildApplyRenderOptions sets it to "talm apply" in the first place. A future refactor that drops the field would slip through unnoticed. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
1 parent b7df415 commit 405b5ca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/commands/apply_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ func TestBuildApplyRenderOptions(t *testing.T) {
5454
if len(opts.TemplateFiles) != 1 || opts.TemplateFiles[0] != "templates/controlplane.yaml" {
5555
t.Errorf("expected TemplateFiles=[templates/controlplane.yaml], got %v", opts.TemplateFiles)
5656
}
57+
if opts.CommandName != "talm apply" {
58+
t.Errorf("expected CommandName=%q, got %q (engine.Render uses this for FailIfMultiNodes error wording)", "talm apply", opts.CommandName)
59+
}
5760
}
5861

5962
func TestBuildApplyPatchOptions(t *testing.T) {

0 commit comments

Comments
 (0)