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
it'deletes old systemd service'dofile=chef_run.file('/etc/systemd/system/statsd.service')expect(chef_run).todelete_file('/etc/systemd/system/statsd.service')expect(file).tonotify('execute[statsd_systemctl_daemon_reload]').to(:run).immediatelyendifversion >= '7.0'it'does not delete systemd service on rhel 6'dofile=chef_run.file('/etc/systemd/system/statsd.service')expect(chef_run).to_notdelete_file('/etc/systemd/system/statsd.service')expect(file).to_notnotify('execute[statsd_systemctl_daemon_reload]').to(:run).immediatelyendifversion < '7.0'
I end up with a chefspec run that fails only the last notification assertion:
1) statsd::default On redhat 6.7 does not delete systemd service on rhel 6
Failure/Error: expect(file).to_not notify('execute[statsd_systemctl_daemon_reload]').to(:run).immediately
expected "file[/etc/systemd/system/statsd.service]" to not notify "execute[statsd_systemctl_daemon_reload]", but it did.
# ./spec/recipe_default_spec.rb:120:in `block (5 levels) in <top (required)>'
In an actual chef run, this resource does not send a notification when the only_if condition is not met. Am I doing something wrong with my test definition? The fact that the results for file deletion are accurate leads me to believe the conditions are evaluating as expected.
The text was updated successfully, but these errors were encountered:
With a resource block in a recipe like so...
and a test like so...
I end up with a chefspec run that fails only the last notification assertion:
In an actual chef run, this resource does not send a notification when the
only_if
condition is not met. Am I doing something wrong with my test definition? The fact that the results for file deletion are accurate leads me to believe the conditions are evaluating as expected.The text was updated successfully, but these errors were encountered: