test(agent): fix service banner trim test flake (#10384)

This commit is contained in:
Mathias Fredriksson
2023-10-23 18:06:59 +03:00
committed by GitHub
parent a7243b3f3b
commit 8f1b4fb061
+7 -2
View File
@@ -350,8 +350,13 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
unexpected: []string{},
},
{
name: "Trim",
manifest: agentsdk.Manifest{},
name: "Trim",
// Enable motd since it will be printed after the banner,
// this ensures that we can test for an exact mount of
// newlines.
manifest: agentsdk.Manifest{
MOTDFile: name,
},
banner: codersdk.ServiceBannerConfig{
Enabled: true,
Message: "\n\n\n\n\n\nbanner\n\n\n\n\n\n",