summaryrefslogtreecommitdiff
path: root/tests/order.rb
blob: ffa6ae4ee4047bfa4970834ded1c93240948b998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class LeapCli::Config::Node
  #
  # returns a list of node names that should be tested before this node.
  # make sure to not return ourselves (please no dependency loops!).
  #
  def test_dependencies
    dependents = LeapCli::Config::ObjectList.new
    unless services.include?('couchdb')
      if services.include?('webapp') || services.include?('mx') || services.include?('soledad')
        dependents.merge! nodes_like_me[:services => 'couchdb']
      end
    end
    dependents.keys.delete_if {|name| self.name == name}
  end
end