riak-client 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.document +5 -5
- data/.gitignore +3 -0
- data/Gemfile +17 -17
- data/Guardfile +20 -20
- data/LICENSE.md +16 -16
- data/RELNOTES.md +4 -0
- data/Rakefile +6 -1
- data/lib/riak/client/beefcake/crdt/counter_loader.rb +18 -18
- data/lib/riak/client/beefcake/crdt/hyper_log_log_loader.rb +18 -0
- data/lib/riak/client/beefcake/crdt/map_loader.rb +64 -64
- data/lib/riak/client/beefcake/crdt_loader.rb +4 -1
- data/lib/riak/client/beefcake/crdt_operator.rb +13 -0
- data/lib/riak/client/beefcake/footer +4 -4
- data/lib/riak/client/beefcake/header +6 -6
- data/lib/riak/client/beefcake/messages.rb +67 -10
- data/lib/riak/client/decaying.rb +36 -36
- data/lib/riak/client/feature_detection.rb +120 -120
- data/lib/riak/client/instrumentation.rb +19 -19
- data/lib/riak/client/node.rb +49 -49
- data/lib/riak/client/search.rb +27 -27
- data/lib/riak/conflict.rb +13 -13
- data/lib/riak/core_ext.rb +7 -7
- data/lib/riak/core_ext/blank.rb +53 -53
- data/lib/riak/core_ext/extract_options.rb +7 -7
- data/lib/riak/core_ext/json.rb +15 -15
- data/lib/riak/core_ext/slice.rb +18 -18
- data/lib/riak/core_ext/stringify_keys.rb +10 -10
- data/lib/riak/core_ext/symbolize_keys.rb +10 -10
- data/lib/riak/core_ext/to_param.rb +31 -31
- data/lib/riak/crdt.rb +23 -21
- data/lib/riak/crdt/base.rb +1 -1
- data/lib/riak/crdt/hyper_log_log.rb +97 -0
- data/lib/riak/crdt/operation.rb +19 -19
- data/lib/riak/encoding.rb +6 -6
- data/lib/riak/errors/backend_creation.rb +9 -9
- data/lib/riak/errors/connection_error.rb +50 -50
- data/lib/riak/errors/protobuffs_error.rb +11 -11
- data/lib/riak/i18n.rb +7 -7
- data/lib/riak/instrumentation.rb +6 -6
- data/lib/riak/json.rb +52 -52
- data/lib/riak/list_buckets.rb +28 -28
- data/lib/riak/locale/en.yml +1 -0
- data/lib/riak/locale/fr.yml +51 -51
- data/lib/riak/map_reduce/results.rb +49 -49
- data/lib/riak/map_reduce_error.rb +7 -7
- data/lib/riak/multiget.rb +122 -122
- data/lib/riak/robject.rb +17 -1
- data/lib/riak/search/result_document.rb +9 -0
- data/lib/riak/stamp.rb +77 -77
- data/lib/riak/tombstone.rb +13 -0
- data/lib/riak/util/tcp_socket_extensions.rb +58 -58
- data/lib/riak/version.rb +1 -1
- data/spec/failover/failover.rb +59 -59
- data/spec/fixtures/bitcask.txt +25 -25
- data/spec/fixtures/multipart-basic-conflict.txt +15 -15
- data/spec/fixtures/multipart-blank.txt +7 -7
- data/spec/fixtures/multipart-mapreduce.txt +10 -10
- data/spec/fixtures/multipart-with-body.txt +16 -16
- data/spec/fixtures/multipart-with-marked-tombstones.txt +17 -17
- data/spec/fixtures/multipart-with-unmarked-tombstone.txt +16 -16
- data/spec/fixtures/server.cert.crt +15 -15
- data/spec/fixtures/server.cert.key +15 -15
- data/spec/fixtures/test.pem +1 -1
- data/spec/integration/riak/bucket_types_spec.rb +38 -0
- data/spec/integration/riak/crdt/configuration_spec.rb +4 -3
- data/spec/integration/riak/crdt_spec.rb +70 -0
- data/spec/integration/riak/encodings/crdt_spec.rb +29 -3
- data/spec/integration/riak/encodings/yz_spec.rb +2 -1
- data/spec/integration/riak/preflist_spec.rb +15 -3
- data/spec/integration/riak/protobuffs/timeouts_spec.rb +1 -1
- data/spec/integration/riak/security_spec.rb +11 -6
- data/spec/integration/riak/threading_spec.rb +154 -150
- data/spec/integration/yokozuna/index_spec.rb +61 -61
- data/spec/integration/yokozuna/queries_spec.rb +1 -1
- data/spec/integration/yokozuna/schema_spec.rb +49 -49
- data/spec/riak/beefcake_protobuffs_backend/crdt_operator_spec.rb +22 -0
- data/spec/riak/core_ext/to_param_spec.rb +15 -15
- data/spec/riak/crdt/hyper_log_log_spec.rb +56 -0
- data/spec/riak/crdt/inner_counter_spec.rb +21 -21
- data/spec/riak/crdt/inner_set_spec.rb +33 -33
- data/spec/riak/crdt/set_spec.rb +61 -61
- data/spec/riak/crdt/shared_examples.rb +14 -0
- data/spec/riak/escape_spec.rb +72 -72
- data/spec/riak/feature_detection_spec.rb +77 -77
- data/spec/riak/index_collection_spec.rb +53 -53
- data/spec/riak/instrumentation_spec.rb +124 -124
- data/spec/riak/link_spec.rb +85 -85
- data/spec/riak/list_buckets_spec.rb +41 -41
- data/spec/riak/node_spec.rb +26 -26
- data/spec/riak/robject_spec.rb +45 -0
- data/spec/support/certs/README.md +12 -12
- data/spec/support/certs/ca.crt +21 -21
- data/spec/support/certs/client.crl +13 -13
- data/spec/support/certs/client.crt +94 -94
- data/spec/support/certs/client.csr +18 -18
- data/spec/support/certs/client.key +27 -27
- data/spec/support/certs/empty_ca.crt +21 -21
- data/spec/support/certs/server.crl +13 -13
- data/spec/support/certs/server.crt +94 -94
- data/spec/support/certs/server.key +27 -27
- data/spec/support/crdt_search_fixtures.rb +1 -1
- data/spec/support/integration_setup.rb +10 -10
- data/spec/support/test_client.rb +1 -1
- data/spec/support/test_client.yml.example +10 -10
- metadata +10 -3
data/spec/riak/link_spec.rb
CHANGED
@@ -1,85 +1,85 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Riak::Link do
|
4
|
-
describe "parsing a link header" do
|
5
|
-
it "creates Link objects from the data" do
|
6
|
-
result = Riak::Link.parse('</riak/foo/bar>; rel="tag", </riak/foo>; rel="up"')
|
7
|
-
expect(result).to be_kind_of(Array)
|
8
|
-
expect(result).to be_all {|i| Riak::Link === i }
|
9
|
-
end
|
10
|
-
|
11
|
-
it "sets the bucket, key, url and rel parameters properly" do
|
12
|
-
result = Riak::Link.parse('</riak/foo/bar>; riaktag="tag", </riak/foo>; rel="up"')
|
13
|
-
expect(result[0].url).to eq("/riak/foo/bar")
|
14
|
-
expect(result[0].bucket).to eq("foo")
|
15
|
-
expect(result[0].key).to eq("bar")
|
16
|
-
expect(result[0].rel).to eq("tag")
|
17
|
-
expect(result[1].url).to eq("/riak/foo")
|
18
|
-
expect(result[1].bucket).to eq("foo")
|
19
|
-
expect(result[1].key).to eq(nil)
|
20
|
-
expect(result[1].rel).to eq("up")
|
21
|
-
end
|
22
|
-
|
23
|
-
it "keeps the url intact if it does not point to a bucket or bucket/key" do
|
24
|
-
result = Riak::Link.parse('</mapred>; rel="riak_kv_wm_mapred"')
|
25
|
-
expect(result[0].url).to eq("/mapred")
|
26
|
-
expect(result[0].bucket).to be_nil
|
27
|
-
expect(result[0].key).to be_nil
|
28
|
-
end
|
29
|
-
|
30
|
-
it "parses the Riak 1.0 URL scheme" do
|
31
|
-
result = Riak::Link.parse('</buckets/b/keys/k>; riaktag="tag"').first
|
32
|
-
expect(result.bucket).to eq('b')
|
33
|
-
expect(result.key).to eq('k')
|
34
|
-
expect(result.tag).to eq('tag')
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
context "converting to a string" do
|
39
|
-
it "to a string appropriate for use in the Link header" do
|
40
|
-
expect(Riak::Link.new("/riak/foo", "up").to_s).to eq('</riak/foo>; riaktag="up"')
|
41
|
-
expect(Riak::Link.new("/riak/foo/bar", "next").to_s).to eq('</riak/foo/bar>; riaktag="next"')
|
42
|
-
expect(Riak::Link.new("/riak", "riak_kv_wm_raw").to_s).to eq('</riak>; riaktag="riak_kv_wm_raw"')
|
43
|
-
end
|
44
|
-
|
45
|
-
it "converts to a string using the new URL scheme" do
|
46
|
-
expect(Riak::Link.new("bucket", "key", "tag").to_s(true)).to eq('</buckets/bucket/keys/key>; riaktag="tag"')
|
47
|
-
expect(Riak::Link.parse('</riak/bucket/key>; riaktag="tag"').first.to_s(true)).to eq('</buckets/bucket/keys/key>; riaktag="tag"')
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
it "converts to a walk spec when pointing to an object" do
|
52
|
-
expect(Riak::Link.new("/riak/foo/bar", "next").to_walk_spec.to_s).to eq("foo,next,_")
|
53
|
-
expect { Riak::Link.new("/riak/foo", "up").to_walk_spec }.to raise_error
|
54
|
-
end
|
55
|
-
|
56
|
-
it "is equivalent to a link with the same url and rel" do
|
57
|
-
one = Riak::Link.new("/riak/foo/bar", "next")
|
58
|
-
two = Riak::Link.new("/riak/foo/bar", "next")
|
59
|
-
expect(one).to eq(two)
|
60
|
-
expect([one]).to include(two)
|
61
|
-
expect([two]).to include(one)
|
62
|
-
end
|
63
|
-
|
64
|
-
it "unescapes the bucket name" do
|
65
|
-
expect(Riak::Link.new("/riak/bucket%20spaces/key", "foo").bucket).to eq("bucket spaces")
|
66
|
-
end
|
67
|
-
|
68
|
-
it "unescapes the key name" do
|
69
|
-
expect(Riak::Link.new("/riak/bucket/key%2Fname", "foo").key).to eq("key/name")
|
70
|
-
end
|
71
|
-
|
72
|
-
it "doesn't rely on the prefix to equal /riak/ when extracting the bucket and key" do
|
73
|
-
link = Riak::Link.new("/raw/bucket/key", "foo")
|
74
|
-
expect(link.bucket).to eq("bucket")
|
75
|
-
expect(link.key).to eq("key")
|
76
|
-
end
|
77
|
-
|
78
|
-
it "constructs from bucket, key and tag" do
|
79
|
-
link = Riak::Link.new("bucket", "key", "tag")
|
80
|
-
expect(link.bucket).to eq("bucket")
|
81
|
-
expect(link.key).to eq("key")
|
82
|
-
expect(link.tag).to eq("tag")
|
83
|
-
expect(link.url).to eq("/riak/bucket/key")
|
84
|
-
end
|
85
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Riak::Link do
|
4
|
+
describe "parsing a link header" do
|
5
|
+
it "creates Link objects from the data" do
|
6
|
+
result = Riak::Link.parse('</riak/foo/bar>; rel="tag", </riak/foo>; rel="up"')
|
7
|
+
expect(result).to be_kind_of(Array)
|
8
|
+
expect(result).to be_all {|i| Riak::Link === i }
|
9
|
+
end
|
10
|
+
|
11
|
+
it "sets the bucket, key, url and rel parameters properly" do
|
12
|
+
result = Riak::Link.parse('</riak/foo/bar>; riaktag="tag", </riak/foo>; rel="up"')
|
13
|
+
expect(result[0].url).to eq("/riak/foo/bar")
|
14
|
+
expect(result[0].bucket).to eq("foo")
|
15
|
+
expect(result[0].key).to eq("bar")
|
16
|
+
expect(result[0].rel).to eq("tag")
|
17
|
+
expect(result[1].url).to eq("/riak/foo")
|
18
|
+
expect(result[1].bucket).to eq("foo")
|
19
|
+
expect(result[1].key).to eq(nil)
|
20
|
+
expect(result[1].rel).to eq("up")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "keeps the url intact if it does not point to a bucket or bucket/key" do
|
24
|
+
result = Riak::Link.parse('</mapred>; rel="riak_kv_wm_mapred"')
|
25
|
+
expect(result[0].url).to eq("/mapred")
|
26
|
+
expect(result[0].bucket).to be_nil
|
27
|
+
expect(result[0].key).to be_nil
|
28
|
+
end
|
29
|
+
|
30
|
+
it "parses the Riak 1.0 URL scheme" do
|
31
|
+
result = Riak::Link.parse('</buckets/b/keys/k>; riaktag="tag"').first
|
32
|
+
expect(result.bucket).to eq('b')
|
33
|
+
expect(result.key).to eq('k')
|
34
|
+
expect(result.tag).to eq('tag')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context "converting to a string" do
|
39
|
+
it "to a string appropriate for use in the Link header" do
|
40
|
+
expect(Riak::Link.new("/riak/foo", "up").to_s).to eq('</riak/foo>; riaktag="up"')
|
41
|
+
expect(Riak::Link.new("/riak/foo/bar", "next").to_s).to eq('</riak/foo/bar>; riaktag="next"')
|
42
|
+
expect(Riak::Link.new("/riak", "riak_kv_wm_raw").to_s).to eq('</riak>; riaktag="riak_kv_wm_raw"')
|
43
|
+
end
|
44
|
+
|
45
|
+
it "converts to a string using the new URL scheme" do
|
46
|
+
expect(Riak::Link.new("bucket", "key", "tag").to_s(true)).to eq('</buckets/bucket/keys/key>; riaktag="tag"')
|
47
|
+
expect(Riak::Link.parse('</riak/bucket/key>; riaktag="tag"').first.to_s(true)).to eq('</buckets/bucket/keys/key>; riaktag="tag"')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
it "converts to a walk spec when pointing to an object" do
|
52
|
+
expect(Riak::Link.new("/riak/foo/bar", "next").to_walk_spec.to_s).to eq("foo,next,_")
|
53
|
+
expect { Riak::Link.new("/riak/foo", "up").to_walk_spec }.to raise_error
|
54
|
+
end
|
55
|
+
|
56
|
+
it "is equivalent to a link with the same url and rel" do
|
57
|
+
one = Riak::Link.new("/riak/foo/bar", "next")
|
58
|
+
two = Riak::Link.new("/riak/foo/bar", "next")
|
59
|
+
expect(one).to eq(two)
|
60
|
+
expect([one]).to include(two)
|
61
|
+
expect([two]).to include(one)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "unescapes the bucket name" do
|
65
|
+
expect(Riak::Link.new("/riak/bucket%20spaces/key", "foo").bucket).to eq("bucket spaces")
|
66
|
+
end
|
67
|
+
|
68
|
+
it "unescapes the key name" do
|
69
|
+
expect(Riak::Link.new("/riak/bucket/key%2Fname", "foo").key).to eq("key/name")
|
70
|
+
end
|
71
|
+
|
72
|
+
it "doesn't rely on the prefix to equal /riak/ when extracting the bucket and key" do
|
73
|
+
link = Riak::Link.new("/raw/bucket/key", "foo")
|
74
|
+
expect(link.bucket).to eq("bucket")
|
75
|
+
expect(link.key).to eq("key")
|
76
|
+
end
|
77
|
+
|
78
|
+
it "constructs from bucket, key and tag" do
|
79
|
+
link = Riak::Link.new("bucket", "key", "tag")
|
80
|
+
expect(link.bucket).to eq("bucket")
|
81
|
+
expect(link.key).to eq("key")
|
82
|
+
expect(link.tag).to eq("tag")
|
83
|
+
expect(link.url).to eq("/riak/bucket/key")
|
84
|
+
end
|
85
|
+
end
|
@@ -1,41 +1,41 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Riak::ListBuckets do
|
4
|
-
before :each do
|
5
|
-
@client = Riak::Client.new
|
6
|
-
@backend = double 'backend'
|
7
|
-
@fake_pool = double 'connection pool'
|
8
|
-
allow(@fake_pool).to receive(:take).and_yield(@backend)
|
9
|
-
|
10
|
-
@expect_list = expect(@backend).to receive(:list_buckets)
|
11
|
-
|
12
|
-
@client.instance_variable_set :@protobuffs_pool, @fake_pool
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "non-streaming" do
|
16
|
-
it 'calls the backend without a block' do
|
17
|
-
@expect_list.with({}).and_return(%w{a b c d})
|
18
|
-
|
19
|
-
@client.list_buckets
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "streaming" do
|
24
|
-
it 'calls the backend with a block' do
|
25
|
-
@expect_list.
|
26
|
-
and_yield(%w{abc abd abe}).
|
27
|
-
and_yield(%w{bbb ccc ddd})
|
28
|
-
|
29
|
-
@yielded = []
|
30
|
-
|
31
|
-
@client.list_buckets do |bucket|
|
32
|
-
@yielded << bucket
|
33
|
-
end
|
34
|
-
|
35
|
-
@yielded.each do |b|
|
36
|
-
expect(b).to be_a Riak::Bucket
|
37
|
-
end
|
38
|
-
expect(@yielded.map(&:name)).to eq(%w{abc abd abe bbb ccc ddd})
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Riak::ListBuckets do
|
4
|
+
before :each do
|
5
|
+
@client = Riak::Client.new
|
6
|
+
@backend = double 'backend'
|
7
|
+
@fake_pool = double 'connection pool'
|
8
|
+
allow(@fake_pool).to receive(:take).and_yield(@backend)
|
9
|
+
|
10
|
+
@expect_list = expect(@backend).to receive(:list_buckets)
|
11
|
+
|
12
|
+
@client.instance_variable_set :@protobuffs_pool, @fake_pool
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "non-streaming" do
|
16
|
+
it 'calls the backend without a block' do
|
17
|
+
@expect_list.with({}).and_return(%w{a b c d})
|
18
|
+
|
19
|
+
@client.list_buckets
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "streaming" do
|
24
|
+
it 'calls the backend with a block' do
|
25
|
+
@expect_list.
|
26
|
+
and_yield(%w{abc abd abe}).
|
27
|
+
and_yield(%w{bbb ccc ddd})
|
28
|
+
|
29
|
+
@yielded = []
|
30
|
+
|
31
|
+
@client.list_buckets do |bucket|
|
32
|
+
@yielded << bucket
|
33
|
+
end
|
34
|
+
|
35
|
+
@yielded.each do |b|
|
36
|
+
expect(b).to be_a Riak::Bucket
|
37
|
+
end
|
38
|
+
expect(@yielded.map(&:name)).to eq(%w{abc abd abe bbb ccc ddd})
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/spec/riak/node_spec.rb
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Riak::Client::Node do
|
4
|
-
before :each do
|
5
|
-
@client = Riak::Client.new
|
6
|
-
@node = Riak::Client::Node.new @client
|
7
|
-
end
|
8
|
-
|
9
|
-
describe 'when initializing' do
|
10
|
-
it 'defaults to the local interface on port 8087' do
|
11
|
-
node = Riak::Client::Node.new @client
|
12
|
-
expect(node.host).to eq('127.0.0.1')
|
13
|
-
expect(node.pb_port).to eq(8087)
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'accepts a host' do
|
17
|
-
node = Riak::Client::Node.new(@client, :host => 'riak.basho.com')
|
18
|
-
expect(node.host).to eq("riak.basho.com")
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'accepts a Protobuffs port' do
|
22
|
-
node = Riak::Client::Node.new @client, :pb_port => 9000
|
23
|
-
expect(node.pb_port).to eq(9000)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Riak::Client::Node do
|
4
|
+
before :each do
|
5
|
+
@client = Riak::Client.new
|
6
|
+
@node = Riak::Client::Node.new @client
|
7
|
+
end
|
8
|
+
|
9
|
+
describe 'when initializing' do
|
10
|
+
it 'defaults to the local interface on port 8087' do
|
11
|
+
node = Riak::Client::Node.new @client
|
12
|
+
expect(node.host).to eq('127.0.0.1')
|
13
|
+
expect(node.pb_port).to eq(8087)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'accepts a host' do
|
17
|
+
node = Riak::Client::Node.new(@client, :host => 'riak.basho.com')
|
18
|
+
expect(node.host).to eq("riak.basho.com")
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'accepts a Protobuffs port' do
|
22
|
+
node = Riak::Client::Node.new @client, :pb_port => 9000
|
23
|
+
expect(node.pb_port).to eq(9000)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/spec/riak/robject_spec.rb
CHANGED
@@ -216,6 +216,10 @@ describe Riak::RObject do
|
|
216
216
|
expect(@object.conflict?).to be_falsey
|
217
217
|
end
|
218
218
|
|
219
|
+
it "doesn't set tombstone when there is none" do
|
220
|
+
expect(@object.tombstone?).to be_falsey
|
221
|
+
end
|
222
|
+
|
219
223
|
it 'returns [RContent] for siblings' do
|
220
224
|
expect(@object.siblings).to eq([@object.content])
|
221
225
|
end
|
@@ -494,4 +498,45 @@ describe Riak::RObject do
|
|
494
498
|
expect(invoked_resolvers).to eq([:resolver_1, :resolver_2])
|
495
499
|
end
|
496
500
|
end
|
501
|
+
|
502
|
+
describe "when working with a tombstone object" do
|
503
|
+
before :each do
|
504
|
+
@backend = double("Backend")
|
505
|
+
allow(@client).to receive(:backend).and_yield(@backend)
|
506
|
+
@object =Riak::RObject.new(@bucket)
|
507
|
+
@object.siblings.clear
|
508
|
+
@object.vclock = "notnil"
|
509
|
+
end
|
510
|
+
|
511
|
+
it "sets the tombstone flag" do
|
512
|
+
expect(@object.tombstone?).to be true
|
513
|
+
end
|
514
|
+
|
515
|
+
it "does not set the conflict flag" do
|
516
|
+
expect(@object.conflict?).to be_falsey
|
517
|
+
end
|
518
|
+
|
519
|
+
it "does not allow you to store a tombstone" do
|
520
|
+
expect { @object.store }.to raise_error(Riak::Tombstone)
|
521
|
+
end
|
522
|
+
|
523
|
+
it "does not allow you to fetch a value" do
|
524
|
+
expect { @object.content }.to raise_error(Riak::Tombstone)
|
525
|
+
end
|
526
|
+
|
527
|
+
it "allows you to revive the object" do
|
528
|
+
@object.revive
|
529
|
+
expect(@object.tombstone?).to be_falsey
|
530
|
+
expect(@object.siblings.empty?).to be_falsey
|
531
|
+
end
|
532
|
+
|
533
|
+
it "allows revived objects to be stored" do
|
534
|
+
expect(@object.tombstone?).to be true
|
535
|
+
@object.revive
|
536
|
+
@object.content_type = "text/plain"
|
537
|
+
@object.data = "This is some text."
|
538
|
+
expect(@backend).to receive(:store_object).and_return(true)
|
539
|
+
@object.store
|
540
|
+
end
|
541
|
+
end
|
497
542
|
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
**DO NOT USE THESE IN PRODUCTION**
|
2
|
-
|
3
|
-
This directory has certificates and a key for testing Riak authentication.
|
4
|
-
|
5
|
-
* server.key - a private key for a Riak server
|
6
|
-
* server.crt - the certificate for server.key
|
7
|
-
* ca.crt - a certificate for the CA that issued server.crt
|
8
|
-
* empty_ca.crt - a certificate for a CA that has and cannot ever issue a
|
9
|
-
certificate (I deleted its private key)
|
10
|
-
|
11
|
-
**DO NOT USE THESE IN PRODUCTION**
|
12
|
-
|
1
|
+
**DO NOT USE THESE IN PRODUCTION**
|
2
|
+
|
3
|
+
This directory has certificates and a key for testing Riak authentication.
|
4
|
+
|
5
|
+
* server.key - a private key for a Riak server
|
6
|
+
* server.crt - the certificate for server.key
|
7
|
+
* ca.crt - a certificate for the CA that issued server.crt
|
8
|
+
* empty_ca.crt - a certificate for a CA that has and cannot ever issue a
|
9
|
+
certificate (I deleted its private key)
|
10
|
+
|
11
|
+
**DO NOT USE THESE IN PRODUCTION**
|
12
|
+
|
13
13
|
These were generated using https://github.com/basho-labs/riak-ruby-ca .
|
data/spec/support/certs/ca.crt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDjDCCAnQCCQDCaCbuH5N1HjANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC
|
3
|
-
VVMxEDAOBgNVBAgMB0Zsb3JpZGExDjAMBgNVBAcMBU1pYW1pMQ4wD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