Sha256: da5c2c87619030226e02ac4d36bde1e426b1a9f6328fe245195116bf2fe322b4
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
shared_examples "read only client" do it "should not allow write" do key= random_key expect{ read_only_client.set(key, uuid.generate) }.to raise_error(Net::HTTPRetriableError) end it "should allow reads" do key = random_key value = uuid.generate client.set(key, value) sleep 1 expect(read_only_client.get(key).value).to eq(value) end it "should allow watch" do key = random_key value = uuid.generate index = client.set(key, value).index expect(read_only_client.watch(key, index: index).value).to eq(value) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
etcd-0.0.6 | spec/functional/read_only_client_spec.rb |