diff options
author | Francis Irving <francis@mysociety.org> | 2010-09-03 15:52:05 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-09-03 15:52:05 +0100 |
commit | d06975ca01f0033bcd9dd4253007319c507a4c4c (patch) | |
tree | aba6e94a26d685a5c301e8ec51b03bc6f36fb824 /vendor/plugins/interlock/test/setup.rb | |
parent | 08430db20111c7e853cad6c1710ebc3dc4150375 (diff) |
Use interlock and memcached to cache front page with interlocking
view/controller fragments.
Diffstat (limited to 'vendor/plugins/interlock/test/setup.rb')
-rw-r--r-- | vendor/plugins/interlock/test/setup.rb | 22 |
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 |