Skip to content

TestSigProxyWithTTY: fix - #2016

Merged
kolyshkin merged 1 commit into
docker:masterfrom
kolyshkin:TestSigProxyWithTTY
Jul 31, 2019
Merged

TestSigProxyWithTTY: fix#2016
kolyshkin merged 1 commit into
docker:masterfrom
kolyshkin:TestSigProxyWithTTY

Conversation

@kolyshkin

@kolyshkinkolyshkin commented Jul 24, 2019

Copy link
Copy Markdown
Contributor

exec.CombinedOutput() should not be used here because:

  • it redirects cmd Stdout and Stderr and we want it to be the tty
  • it calls cmd.Run() which we already did

While at it

  • use pty.Start() as it is cleaner
  • make sure we don't leave a zombie running, by calling Wait() in defer
  • use test.Name() for containerName

@codecov-io

codecov-io commented Jul 24, 2019

Copy link
Copy Markdown

Codecov Report

Merging #2016 into master will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@## master #2016 +/- ##
=======================================
Coverage 56.79% 56.79% =======================================
Files 311 311 Lines 21836 21836 =======================================
Hits 12402 12402 Misses 8519 8519 Partials 915 915

@kolyshkinkolyshkin changed the title TestSigProxyWithTTY: fix[WIP] TestSigProxyWithTTY: fixJul 24, 2019
@kolyshkin
kolyshkinforce-pushed the TestSigProxyWithTTY branch 7 times, most recently from c3d7850 to ba3d3d8CompareJuly 29, 2019 21:57
@kolyshkinkolyshkin changed the title [WIP] TestSigProxyWithTTY: fixTestSigProxyWithTTY: fixJul 29, 2019
@kolyshkin
kolyshkin requested a review from thaJeztahJuly 30, 2019 23:53
exec.CombinedOutput should not be used here because:
- it redirects cmd Stdout and Stderr and we want it to be the tty
- it calls cmd.Run which we already did
While at it
- use pty.Start() as it is cleaner
- make sure we don't leave a zombie running, by calling Wait() in defer
- use test.Name() for containerName
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
kolyshkinforce-pushed the TestSigProxyWithTTY branch from ba3d3d8 to e085cd3CompareJuly 31, 2019 00:40
@kolyshkinkolyshkin changed the title TestSigProxyWithTTY: fix[WIP] TestSigProxyWithTTY: fixJul 31, 2019
@kolyshkin
kolyshkinforce-pushed the TestSigProxyWithTTY branch from e085cd3 to bc4ed69CompareJuly 31, 2019 00:56
@kolyshkinkolyshkin changed the title [WIP] TestSigProxyWithTTY: fixTestSigProxyWithTTY: fixJul 31, 2019

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewhsuandrewhsu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@kolyshkin@codecov-io@andrewhsu@thaJeztah@GordonTheTurtle