spec/etcd/stats_spec.rb in etcd-0.2.4 vs spec/etcd/stats_spec.rb in etcd-0.3.0
- old
+ new
@@ -1,34 +1,25 @@
# Encoding: utf-8
require 'spec_helper'
describe Etcd::Stats do
-
- before(:all) do
- start_daemon(5)
- end
-
- after(:all) do
- stop_daemon
- end
-
let(:client) do
etcd_client
end
+ let(:leader) do
+ etcd_leader
+ end
+
describe 'of leader' do
let(:stats) do
client.stats(:leader)
end
it 'should contain a key for leader' do
- expect(stats['leader']).to_not be_nil
- end
-
- it 'should have 4 followers (since we spawn 5 node etcd cluster)' do
- expect(stats['followers'].keys.size).to eq(4)
+ expect(leader.stats(:leader)).to_not be_nil
end
end
it 'should show self statsistics' do
expect(client.stats(:self)['name']).to_not be_nil