Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Commit

Permalink
0.9.25: Adding readRemaining to signal test
Browse files Browse the repository at this point in the history
This release adds a readRemaining call to the signal test.
  • Loading branch information
Janos Pasztor committed Mar 30, 2021
1 parent 071a596 commit 0793648
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.9.25: Adding readRemaining to signal test

This release adds a readRemaining call to the signal test.

## 0.9.24: Use new agent feature to run tests

This release brings down the timeouts again and uses the new `wait-signal` feature in the [ContainerSSH guest agent](https://github.com/ContainerSSH/agent) to wait for signal.
Expand Down
6 changes: 6 additions & 0 deletions conformanceTestSuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (c *conformanceTestSuite) singleProgramShouldRun(t *testing.T) {
t.Fatalf("invalid exit code returned: %d", session.ExitCode())
}
_ = session.Close()
t.Log("test complete")
}

func (c *conformanceTestSuite) settingEnvVariablesShouldWork(t *testing.T) {
Expand Down Expand Up @@ -100,6 +101,7 @@ func (c *conformanceTestSuite) settingEnvVariablesShouldWork(t *testing.T) {
t.Fatalf("invalid exit code returned: %d", session.ExitCode())
}
_ = session.Close()
t.Log("test complete")
}

func (c *conformanceTestSuite) runningInteractiveShellShouldWork(t *testing.T) {
Expand Down Expand Up @@ -152,6 +154,7 @@ func (c *conformanceTestSuite) runningInteractiveShellShouldWork(t *testing.T) {
return
}
_ = session.Close()
t.Log("test complete")
}

func (c *conformanceTestSuite) testShellInteraction(t *testing.T, session TestClientSession) bool {
Expand Down Expand Up @@ -221,6 +224,7 @@ func (c *conformanceTestSuite) reportingExitCodeShouldWork(t *testing.T) {
t.Fatalf("invalid exit code returned: %d", session.ExitCode())
}
_ = session.Close()
t.Log("test complete")
}

func (c *conformanceTestSuite) sendingSignalsShouldWork(t *testing.T) {
Expand Down Expand Up @@ -262,11 +266,13 @@ func (c *conformanceTestSuite) sendingSignalsShouldWork(t *testing.T) {
if err := session.WaitForStdout(timeout, []byte("USR1 received")); err != nil {
t.Fatal(err)
}
session.ReadRemaining()
if err := session.Wait(); err != nil {
t.Fatal(err)
}
if session.ExitCode() != 0 {
t.Fatalf("invalid exit code returned: %d", session.ExitCode())
}
_ = session.Close()
t.Log("test complete")
}

0 comments on commit 0793648

Please sign in to comment.