Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Server Jade 2015-05-27
Description
We have acceptance tests for most of our subcommands, except "foreground". Sometime during a git operation we lost the change made to the logback.xml file that allowed for "foreground" to work (specifically, printing to the console). We didn't realize this immediately, and no tests failed, but our "foreground" command was broken.
This ticket is for writing (or attempting) such a test. The challenge is calling "foreground" in a way that allows the test to both detect output on STDOUT but also be able to shut down the Server.
IMPLEMENTATION IDEAS
- Something simple like on(master, "puppetserver foreground" ... won't work because it won't return control to Beaker.
- Redirecting to a file like on(master, "puppetserver foreground > output" ... will capture the output, but we won't be able to terminate the Server (in a reasonable way) at that point.
- We might be able to spawn a child process to run "foreground" and then kill its STDIN in the hopes that this will cause the JVM to terminate, but we're thinking chances are pretty slim this is how the JVM will behave.
- We might be able to run "foreground" via Ruby and then have access to its STDOUT and terminate it via object methods.
Attachments
Issue Links
- relates to
-
SERVER-414 Handle rundir creation for puppet and puppetserver in Puppet Server 2.x
-
- Closed
-
-
SERVER-356 puppetserver foreground produces no output
-
- Closed
-
-
SERVER-439 Investigate puppetserver foreground failing in "2.0.0-rc1"
-
- Closed
-
- links to