diff --git a/CHANGELOG.md b/CHANGELOG.md index aca13b7ec56f0726ccf0f85861c7319366576656..3b854effcd1b7e556803b46508ccb110dc3be67d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added (for new features) +* Test for [caosdb-pylib#103](https://gitlab.com/linkahead/linkahead-pylib/-/issues/103) * Tests for entity state [caosdb-server!62](https://gitlab.com/caosdb/caosdb-server/-/merge_requests/62) * Tests for version history * Tests for inheritance bug (caosdb/caosdb-server!54) diff --git a/tests/test_issues_pylib.py b/tests/test_issues_pylib.py index ec9e873c7b8cd2375570021672bb8eb2bc1ca5c3..43a84e5e26f0650f74b12fa9d1a9fcd62b715e31 100644 --- a/tests/test_issues_pylib.py +++ b/tests/test_issues_pylib.py @@ -66,6 +66,25 @@ def teardown_function(function): # ########################### Issue tests start here ##################### +def test_gitlab_com_103(): + """ + Test that after causing an UriTooLong error the used auth_token + is still valid. + + See https://gitlab.com/linkahead/linkahead-pylib/-/issues/103 and + https://gitlab.indiscale.com/caosdb/customers/f-fit/management/-/issues/82 + """ + # + auth_token = db.get_connection()._authenticator.auth_token + db.configure_connection(auth_token=auth_token) + # + c = db.Container() + c.extend([db.Record(id=i) for i in range(1000,5000)]) + with pytest.raises(db.exceptions.TransactionError) as te: + c.retrieve() + assert "authentication token" not in str(te) + + # @pytest.mark.xfail(reason="Entities with many, long, properties: " # "https://gitlab.com/linkahead/linkahead-pylib/-/issues/108") def test_gitlab_com_108():