# making sure collections.create tells the API server what our
# desired replication level is.
collection = self.run_and_find_collection("", ['--replication', '4'])
- self.assertEqual(4, collection['redundancy'])
+ self.assertEqual(4, collection['replication_desired'])
def test_put_collection_with_default_redundancy(self):
collection = self.run_and_find_collection("")
- self.assertEqual(2, collection['redundancy'])
+ self.assertEqual(2, collection['replication_desired'])
def test_put_collection_with_unnamed_project_link(self):
link = self.run_and_find_collection(
t.add :properties
t.add :portable_data_hash
t.add :signed_manifest_text, as: :manifest_text
+ t.add :replication_desired
end
def self.attributes_required_columns
# confused by the way we expose signed_manifest_text as
# manifest_text in the API response, and never let clients select
# the manifest_text column.
- super.merge('manifest_text' => ['manifest_text'])
+ super.merge('manifest_text' => ['manifest_text'],
+ 'replication_desired' => ['redundancy'])
end
def check_signatures
end
end
+ def replication_desired
+ # Shim until database columns get fixed up in #3410.
+ redundancy or 2
+ end
+
def redundancy_status
if redundancy_confirmed_as.nil?
'unconfirmed'