Commit 26fbf7f6 authored by parciak's avatar parciak
Browse files

Added connection check for remote services to gitlab cicd. Bugfix to...


Added connection check for remote services to gitlab cicd. Bugfix to test_receive due to missing datetime function in python 3.6
Signed-off-by: parciak's avatarMarcel Parciak <marcel.parciak@gmail.com>
parent 7c39cc2a
Pipeline #148016 failed with stage
in 8 minutes and 10 seconds
......@@ -9,7 +9,7 @@ variables:
CDSTAR_VAULT: "medic"
COUCH_URI: "https://c109-199.cloud.gwdg.de:5984"
COUCH_USER: "annotation_agent_test"
couch_pass: "aXu9vcAugzQFvZij0TQOfnnN"
COUCH_PASS: "aXu9vcAugzQFvZij0TQOfnnN"
COUCH_DB: "annotation_test"
build_image:
......@@ -33,6 +33,8 @@ run_tests:
- umg
before_script:
- curl --connect-timeout 5 $CDSTAR_URI
- curl --connect-timeout 5 $COUCH_URI
- python3 -m pip install --upgrade pip
- python3 -m pip install -r requirements.txt
......
......@@ -166,10 +166,10 @@ def test_receive_02(cdstar_archive):
assert meta_json["identifier"] == archive_id
assert datetime.datetime.strptime(
cdstar_json["created"], "%Y-%m-%dT%H:%M:%S.%f%z"
) == datetime.datetime.fromisoformat(meta_json["dateCreated"])
) == datetime.datetime.strptime(meta_json["dateCreated"], "%Y-%m-%dT%H:%M:%S.%f")
assert datetime.datetime.strptime(
cdstar_json["modified"], "%Y-%m-%dT%H:%M:%S.%f%z"
) == datetime.datetime.fromisoformat(meta_json["dateModified"])
) == datetime.datetime.strptime(meta_json["dateModified"], "%Y-%m-%dT%H:%M:%S.%f")
assert int(cdstar_json["file_count"]) == int(meta_json["size"]["value"])
assert int(cdstar_json["file_count"]) == len(meta_json["hasPart"])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment