From 4d5df2920515f4b580290e09c941ef587b247d1a Mon Sep 17 00:00:00 2001
From: Karel van Klink <karel.vanklink@geant.org>
Date: Thu, 13 Apr 2023 13:35:14 +0200
Subject: [PATCH] update configuration file key

---
 config.json.example | 2 +-
 larp/config.py      | 4 ++--
 test/conftest.py    | 2 +-
 test/test_config.py | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/config.json.example b/config.json.example
index 52411a1..14b6303 100644
--- a/config.json.example
+++ b/config.json.example
@@ -1,3 +1,3 @@
 {
-  "collection-uri": "organisation.collection"
+  "collection-name": "organisation.collection"
 }
diff --git a/larp/config.py b/larp/config.py
index b0bd9f7..ee382c4 100644
--- a/larp/config.py
+++ b/larp/config.py
@@ -9,9 +9,9 @@ CONFIG_SCHEMA = {
 
     'type': 'object',
     'properties': {
-        'collection-uri': {'type': 'string'},
+        'collection-name': {'type': 'string'},
     },
-    'required': ['collection-uri'],
+    'required': ['collection-name'],
     'additionalProperties': False
 }
 
diff --git a/test/conftest.py b/test/conftest.py
index e4a5dd3..de3bf68 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -11,7 +11,7 @@ import larp
 @pytest.fixture
 def good_config_data():
     return {
-        'collection-uri': 'organisation.collection'
+        'collection-name': 'organisation.collection'
     }
 
 
diff --git a/test/test_config.py b/test/test_config.py
index 145fdd9..f05e0cc 100644
--- a/test/test_config.py
+++ b/test/test_config.py
@@ -22,5 +22,5 @@ def test_config_correct(good_config_data):
 def test_config_incorrect(bad_config_data):
     with io.StringIO(json.dumps(bad_config_data)) as f:
         f.seek(0)
-        with pytest.raises(Exception, match="'collection-uri' is a required property"):
+        with pytest.raises(Exception, match="'collection-name' is a required property"):
             config.load_from_file(f)
-- 
GitLab