Merge branch 'master' into 4232-slow-pipes-n-jobs
[arvados.git] / sdk / python / tests / test_arv_put.py
index 9d19e8d79a52471a21a6084cff11f44de27dcb86..eaefd790b0741585804ac0f6e503ee2cad31fe0f 100644 (file)
@@ -399,9 +399,13 @@ class ArvadosPutTest(run_test_server.TestCaseWithServers, ArvadosBaseTestCase):
 class ArvPutIntegrationTest(run_test_server.TestCaseWithServers,
                             ArvadosBaseTestCase):
     def _getKeepServerConfig():
-        for config_file in ['application.yml', 'application.default.yml']:
-            with open(os.path.join(run_test_server.SERVICES_SRC_DIR,
-                                   "api", "config", config_file)) as f:
+        for config_file, mandatory in [
+                ['application.yml', True], ['application.default.yml', False]]:
+            path = os.path.join(run_test_server.SERVICES_SRC_DIR,
+                                "api", "config", config_file)
+            if not mandatory and not os.path.exists(path):
+                continue
+            with open(path) as f:
                 rails_config = yaml.load(f.read())
                 for config_section in ['test', 'common']:
                     try:
@@ -535,11 +539,11 @@ class ArvPutIntegrationTest(run_test_server.TestCaseWithServers,
         # 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(None, collection['replication_desired'])
 
     def test_put_collection_with_unnamed_project_link(self):
         link = self.run_and_find_collection(