aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/plugins/interlock/test/setup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/interlock/test/setup.rb')
-rw-r--r--vendor/plugins/interlock/test/setup.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/plugins/interlock/test/setup.rb b/vendor/plugins/interlock/test/setup.rb
new file mode 100644
index 000000000..62d2b1ace
--- /dev/null
+++ b/vendor/plugins/interlock/test/setup.rb
@@ -0,0 +1,22 @@
+
+# Setup integration system for the integration suite
+
+Dir.chdir "#{File.dirname(__FILE__)}/integration/app/" do
+
+ `ps awx`.split("\n").grep(/4304[1-3]/).map do |process|
+ system("kill -9 #{process.to_i}")
+ end
+
+ LOG = "/tmp/memcached.log"
+
+ system "memcached -vv -p 43042 >> #{LOG} 2>&1 &"
+ system "memcached -vv -p 43043 >> #{LOG} 2>&1 &"
+
+ Dir.chdir "vendor/plugins" do
+ system "rm interlock; ln -s ../../../../../ interlock"
+ end
+
+ system "rake db:create"
+ system "rake db:migrate"
+ system "rake db:fixtures:load"
+end