Skip to content

(MODULES-2634) Try / Catch Test Updates #113

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

Conversation

Iristyle
Copy link
Contributor

@Iristyle Iristyle commented May 26, 2016

Finished in 4 minutes 31.7 seconds (files took 2 minutes 24.6 seconds to load)
27 examples, 0 failures

 - Verify that we have actually executed a try / catch and exit with
   the expected status

Paired-with: James Pogran <[email protected]>
 - The tests introduced in 14e0be3
   were insufficient at verifying that code inside of a try or catch
   block was actually being executed due to how the assertions were
   setup.

   Rewrite the tests to separately verify that code inside a try or
   a catch block will produce a file, whose contents can then be
   verified.  Also assert that code we do not expect to be executed
   does not write files.

Paired-with: James Pogran <[email protected]>
@Iristyle Iristyle force-pushed the ticket/master/MODULES-2634-try-catch-tests-redux-again branch from 4dc5876 to b401927 Compare May 26, 2016 22:55
@Iristyle
Copy link
Contributor Author

@puppetlabs/windows this is ready to go

@@ -29,7 +29,7 @@
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
end
c.after :suite do
absent_files = 'file{["c:/services.txt","c:/process.txt"]: ensure => absent }'
absent_files = 'file{["c:/services.txt","c:/process.txt","c:/try_success.txt","c:/catch_shouldntexist.txt","c:/try_shouldntexist.txt","c:/catch_success.txt"]: ensure => absent }'
Copy link
Contributor

Choose a reason for hiding this comment

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

That's something I didn't realize - that it would not clean up those files by after each test.

@ferventcoder
Copy link
Contributor

Running this through adhoc now.

@ferventcoder
Copy link
Contributor

👍

@ferventcoder ferventcoder merged commit ad01d1a into puppetlabs:master May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants