Skip to content
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

validation: Complete process test #624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
2 changes: 2 additions & 0 deletions validation/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ func main() {
if err != nil {
util.Fatal(err)
}

g.SetProcessConsoleSize(10, 80)
Copy link
Contributor

Choose a reason for hiding this comment

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

The spec says:

Runtimes MUST ignore consoleSize if terminal is false or unset.

which makes sense. We currently aren't testing that in runtimetest (and for validation/process.go the standard streams shouldn't be terminals anyway. So I don't have a problem setting consoleSize here, but if we actually want to test something by doing that we need to:

  • Setup our own pseudoterminal pair here with a different size and pass the slave in to create as stdin (at least).
  • Add tests to runtimetest to check that that, when consoleSize is false/unset, the actual console size does not match the config.json value.

g.SetProcessCwd("/test")
g.AddProcessEnv("testa", "valuea")
g.AddProcessEnv("testb", "123")
Expand Down