Skip to content

Commit 8f1b4fb

Browse files
authored
test(agent): fix service banner trim test flake (coder#10384)
1 parent a7243b3 commit 8f1b4fb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

agent/agent_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,13 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
350350
unexpected: []string{},
351351
},
352352
{
353-
name: "Trim",
354-
manifest: agentsdk.Manifest{},
353+
name: "Trim",
354+
// Enable motd since it will be printed after the banner,
355+
// this ensures that we can test for an exact mount of
356+
// newlines.
357+
manifest: agentsdk.Manifest{
358+
MOTDFile: name,
359+
},
355360
banner: codersdk.ServiceBannerConfig{
356361
Enabled: true,
357362
Message: "\n\n\n\n\n\nbanner\n\n\n\n\n\n",

0 commit comments

Comments
 (0)