You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, the test passes, but not silently, and so the rspec test fails.
This is in:
augeas-tools 1.0.0-0ubuntu1raphink1lucid1
Failure exits 1, that should be enough.
The text was updated successfully, but these errors were encountered:
mcallaway
changed the title
rspec-puppet-augeas expects empty results from augparse but are not so
rspec-puppet-augeas expects empty results from augparse
Apr 23, 2014
mcallaway
pushed a commit
to genome-vendor/rspec-puppet-augeas
that referenced
this issue
Apr 23, 2014
This is kind of by design, as the idea with the augparse() function is that you'd supply a result tree as a string in the first argument and the generated tree will be compared against the expected string. The default of '?' is a shortcut (IIRC) so the test will fail, but will output the expected tree, which you can copy and paste so it passes next time.
I could add an option in if you like to make the behaviour configurable? That way we could keep the above, and also allow just using '?' if you want to simply check the file parses, not that it matches a specific tree.
In rspec-puppet-augeas test_utils.rb, we have:
raise RSpec::Puppet::Augeas::Error, "augparse failed:\n#{output}" unless res == 0 && output.empty?
But the test that it performs produces output even if it's correct and exits 0.
As you can see, the test passes, but not silently, and so the rspec test fails.
This is in:
augeas-tools 1.0.0-0ubuntu1
raphink1lucid1Failure exits 1, that should be enough.
The text was updated successfully, but these errors were encountered: