Sha256: 316526ab2d31b47fa6a2e349017aa22afbe1eb72854b5f39a3f2ce944aa23987
Contents?: true
Size: 879 Bytes
Versions: 1
Compression:
Stored size: 879 Bytes
Contents
require 'spec_helper' describe LitmusPaper::Dependency::HaproxyBackends do describe "available?" do before(:each) do FileUtils.rm_rf("/tmp/stub-haproxy-stats") system "spec/support/haproxy_test_socket /tmp/stub-haproxy-stats &" sleep 1 end it "is available if at least one backend is up" do pending "Broken on TravisCI 1.9.x; works locally" if ENV["TRAVIS_RUBY_VERSION"] =~ /\A1.9/ haproxy = LitmusPaper::Dependency::HaproxyBackends.new("/tmp/stub-haproxy-stats", "yellow_cluster") haproxy.should be_available end it "returns 0 if no nodes are available" do pending "Broken on TravisCI 1.9.x; works locally" if ENV["TRAVIS_RUBY_VERSION"] =~ /\A1.9/ haproxy = LitmusPaper::Dependency::HaproxyBackends.new("/tmp/stub-haproxy-stats", "orange_cluster") haproxy.should_not be_available end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
litmus_paper-0.3.1 | spec/litmus_paper/dependency/haproxy_backends_spec.rb |