spec/etcd/keys_spec.rb in etcd-0.2.4 vs spec/etcd/keys_spec.rb in etcd-0.3.0
- old
+ new
@@ -1,11 +1,9 @@
require 'spec_helper'
describe Etcd::Keys do
-
shared_examples 'basic key operation' do
-
it '#set/#get' do
key = random_key
value = uuid.generate
client.set(key, value: value)
expect(client.get(key).value).to eq(value)
@@ -63,45 +61,12 @@
end.to raise_error(Etcd::DirNotEmpty)
end
end
end
end
-
context 'without ssl' do
- before(:all) do
- start_daemon
- end
- after(:all) do
- stop_daemon
- end
let(:client) do
etcd_client
- end
- it_should_behave_like 'basic key operation'
- end
-
- context 'with ssl' do
- before(:all) do
- start_daemon(1, use_ssl: true)
- end
- after(:all) do
- stop_daemon
- end
- let(:client) do
- etcd_ssl_client
- end
- it_should_behave_like 'basic key operation'
- end
-
- context 'with ssl and client certificate' do
- before(:all) do
- start_daemon(1, use_ssl: true, check_client_cert: true )
- end
- after(:all) do
- stop_daemon
- end
- let(:client) do
- etcd_ssl_client_with_cert
end
it_should_behave_like 'basic key operation'
end
end