Skip to content

test(agent): use afero for motd tests to allow parallel execution #8329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tparallel
  • Loading branch information
mafredri committed Jul 5, 2023
commit de70b5218bb9b4b8e7849d117180011cd3d4024c
4 changes: 2 additions & 2 deletions agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,13 @@ func TestAgent_SessionTTYExitCode(t *testing.T) {
}

func TestAgent_Session_TTY_MOTD(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
// This might be our implementation, or ConPTY itself.
// It's difficult to find extensive tests for it, so
// it seems like it could be either.
t.Skip("ConPTY appears to be inconsistent on Windows.")
}
t.Parallel()

u, err := user.Current()
require.NoError(t, err, "get current user")
Expand Down Expand Up @@ -372,13 +372,13 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
}

func TestAgent_Session_TTY_MOTD_Update(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
// This might be our implementation, or ConPTY itself.
// It's difficult to find extensive tests for it, so
// it seems like it could be either.
t.Skip("ConPTY appears to be inconsistent on Windows.")
}
t.Parallel()

// Only the banner updates dynamically; the MOTD file does not.
wantServiceBanner := "Service banner text goes here"
Expand Down