Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Commit

Permalink
Merge pull request #43 from chrismohr/master
Browse files Browse the repository at this point in the history
Add Settings to Memory DataStore
  • Loading branch information
pgr0ss committed Mar 14, 2014
2 parents b4c6646 + c9bfae7 commit 4ec70a7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/curator/memory/data_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
module Curator
module Memory
class DataStore

def settings(bucket_name)
{}
end

def update_settings!(collection_name, updated_settings)
# NOOP
end

def remove_all_keys
@data = {}
end
Expand Down
10 changes: 10 additions & 0 deletions spec/curator/memory/data_store_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ module Curator::Memory
end
end

context "collection settings" do
it "returns empty settings" do
data_store.settings("test_bucket").should be_empty
end

it "update_settings does nothing" do
data_store.update_settings!("test_bucket", {})
end
end

describe 'self.remove_all_keys' do
it 'clears the data set' do
data_store._data[:foo] = 1
Expand Down

0 comments on commit 4ec70a7

Please sign in to comment.