diff --git a/dmci/api/app.py b/dmci/api/app.py index 929b014..2e76a0c 100644 --- a/dmci/api/app.py +++ b/dmci/api/app.py @@ -35,7 +35,7 @@ OK_RETURN = "Everything is OK" FILE_DIST_FAIL = Counter("failed_file_dist", "Number of failed file_dist", ["path"]) -CSW_DIST_FAIL = Counter("failed_csw_dist", "Number of failed csw_dist", ["path"]) +CSW_DIST_FAIL = Counter("failed_pycsw_dist", "Number of failed csw_dist", ["path"]) SOLR_DIST_FAIL = Counter("failed_solr_dist", "Number of failed solr_dist", ["path"]) @@ -76,7 +76,7 @@ def post_insert(): if failed: if "file" in failed: FILE_DIST_FAIL.labels(path=request.path).inc() - if "csw" in failed: + if "pycsw" in failed: CSW_DIST_FAIL.labels(path=request.path).inc() if "solr" in failed: SOLR_DIST_FAIL.labels(path=request.path).inc() @@ -89,7 +89,7 @@ def post_update(): if failed: if "file" in failed: FILE_DIST_FAIL.labels(path=request.path).inc() - if "csw" in failed: + if "pycsw" in failed: CSW_DIST_FAIL.labels(path=request.path).inc() if "solr" in failed: SOLR_DIST_FAIL.labels(path=request.path).inc() diff --git a/tests/test_api/test_app.py b/tests/test_api/test_app.py index 67e1131..56ce727 100644 --- a/tests/test_api/test_app.py +++ b/tests/test_api/test_app.py @@ -227,7 +227,7 @@ def testApiApp_InsertUpdateRequests(client, monkeypatch): # Distribution fails, metrics are incremented with monkeypatch.context() as mp: - f = ["file", "solr", "csw"] + f = ["file", "solr", "pycsw"] s = ["C"] e = ["Reason A", "Reason B", "Reason C"] mp.setattr("dmci.api.app.Worker.validate", lambda *a: (True, "", MOCK_XML)) @@ -240,7 +240,7 @@ def testApiApp_InsertUpdateRequests(client, monkeypatch): "failed_file_dist_total", {"path": "/v1/insert"} ) after_csw = REGISTRY.get_sample_value( - "failed_csw_dist_total", {"path": "/v1/insert"} + "failed_pycsw_dist_total", {"path": "/v1/insert"} ) after_solr = REGISTRY.get_sample_value( "failed_solr_dist_total", {"path": "/v1/insert"} @@ -254,7 +254,7 @@ def testApiApp_InsertUpdateRequests(client, monkeypatch): "failed_file_dist_total", {"path": "/v1/update"} ) after_csw = REGISTRY.get_sample_value( - "failed_csw_dist_total", {"path": "/v1/update"} + "failed_pycsw_dist_total", {"path": "/v1/update"} ) after_solr = REGISTRY.get_sample_value( "failed_solr_dist_total", {"path": "/v1/update"}