summaryrefslogtreecommitdiff
path: root/tests/order.rb
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2014-04-04 10:37:09 -0400
committerMicah Anderson <micah@leap.se>2014-04-04 10:37:09 -0400
commit6af957a1c20f75a827655a3cd75e40a03cffe7c4 (patch)
treee5995b0c4b53583fd9d16857f66f81137dccbf73 /tests/order.rb
parent7451213d5e0772d0d6cba4613bf66792da495909 (diff)
parent1551f785c5c7c515781995928eec7659365d8988 (diff)
Merge branch '0.5' into develop
Conflicts: provider_base/services/tor.json Change-Id: I826579945a0d93c43384f0fd12c9833762b084cf
Diffstat (limited to 'tests/order.rb')
-rw-r--r--tests/order.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/order.rb b/tests/order.rb
new file mode 100644
index 00000000..ffa6ae4e
--- /dev/null
+++ b/tests/order.rb
@@ -0,0 +1,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 \ No newline at end of file