Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/classes/relationship__notify_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@

it { should contain_notify('pre').that_notifies(['Notify[post]']) }
it { should contain_notify('post').that_subscribes_to(['Notify[pre]']) }

# TODO: in practice this transitive notification doesn't work
it { should contain_service('myservice').that_subscribes_to('File[/tmp/file.txt]') }
end
4 changes: 4 additions & 0 deletions spec/fixtures/modules/relationships/manifests/notify.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
class { '::relationships::notify::pre': } ~>
class { '::relationships::notify::middle': } ~>
class { '::relationships::notify::post': }

file { '/tmp/file.txt': } ~>
file { '/tmp/directory': } ~>
service { 'myservice': }
}

class relationships::notify::pre {
Expand Down