The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:
There should be a Result#output that allows access to combined stderr & stdout
|Assignee:||Dominic Maraglia||% Done:|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
Pieter mentioned this to me in discussion.
I think he can give his use case much better description than I, Pieter?
#1 Updated by Anonymous almost 4 years ago
Specifically, as it stands you can make the following assertions:
assert_equal 'Warning!\n', stderr assert_equal 'Yup, I did stuff\n', stdout
but information on whether the end user will see this:
Warning! Yup, I did stuff
Yup, I did stuff Warning!
is completely unknowable. This problem only gets worse as the length of content output to STDOUT and STDERR grows. Cases where STDERR and STDOUT print interleaved content is another layer of frustration atop that.
Having the end result for both streams combined gives you the ability to make better assertions about order, via the transitive property (if lines ‘A’ and ‘C’ went to STDERR, and ‘B’ went to STDOUT, then if the unified output was ‘A\nB\nC\n’ I know that ‘A’ printed to STDERR before ‘B’, and ‘C’ printed to STDERR afterwards).
#2 Updated by Dominic Maraglia almost 4 years ago
- Status changed from Unreviewed to Needs More Information
I understand the use case for this addition though I wonder how many tests cases will need to check the ordering of STDOUT/STDERR output.
Do you suggest creating an entirely new output stream that replaces both STDERR and STDOUT? Or would we would be adding an additional stream, not eliminating STDOUT and STDERR, correct?