Skip to content
Snippets Groups Projects
Verified Commit 6754d9b7 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

TST: update testbed, fix purge tests

parent 25b3d7db
No related branches found
No related tags found
1 merge request!8Draft: Permanent Delete Tests
Pipeline #55683 passed
...@@ -7,6 +7,7 @@ workflow: ...@@ -7,6 +7,7 @@ workflow:
variables: variables:
GIT_SUBMODULE_STRATEGY: "recursive" GIT_SUBMODULE_STRATEGY: "recursive"
GIT_SUBMODULE_FORCE_HTTPS: "true" GIT_SUBMODULE_FORCE_HTTPS: "true"
LINKAHEAD_TAG: "dev_F_f-doip_P_f-string-ids"
test.mock-manager: test.mock-manager:
stage: test stage: test
...@@ -30,9 +31,11 @@ test.testbed: ...@@ -30,9 +31,11 @@ test.testbed:
- apk add make - apk add make
script: script:
- export CORDRA_HTTPS_PORT=9443 - export CORDRA_HTTPS_PORT=9443
- "export LINKAHEAD_IMAGE=$CI_REGISTRY/caosdb/src/caosdb-deploy:$LINKAHEAD_TAG"
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $LINKAHEAD_IMAGE
- make -C fdo-local-testbed clean start - make -C fdo-local-testbed clean start
- "docker run -e DEFAULT_TIMEOUT=5 --network host -v./:/run -w /run python:3.12-alpine ./run_tests.sh" - "docker run -e DEFAULT_TIMEOUT=5 --network host -v./:/run -w /run python:3.12-alpine ./run_tests.sh"
after_script:
after_script: after_script:
- make -C fdo-local-testbed stop - make -C fdo-local-testbed stop
......
Subproject commit a621fba05d0ce97d3657fdbe23b74845eb58f447 Subproject commit f35bd0491471465e2c814509a8bf29fcdb708d85
...@@ -162,9 +162,6 @@ class TestClassPurgeFDO: # pylint: disable=fixme ...@@ -162,9 +162,6 @@ class TestClassPurgeFDO: # pylint: disable=fixme
class TestClassPurgeFDOChecks: # pylint: disable=fixme class TestClassPurgeFDOChecks: # pylint: disable=fixme
"""Tests whether FDO purge is reflected in outside systems""" """Tests whether FDO purge is reflected in outside systems"""
@pytest.mark.xfail(
reason="Handle system lags enough that time(100) is often not enough"
"to avoid still getting a 200 answer")
@pytest.mark.parametrize("service", [pytest.param(service, marks=[ @pytest.mark.parametrize("service", [pytest.param(service, marks=[
pytest.mark.dependency(scope='session', depends=[])]) pytest.mark.dependency(scope='session', depends=[])])
for service in services]) for service in services])
...@@ -198,16 +195,16 @@ class TestClassPurgeFDOChecks: # pylint: disable=fixme ...@@ -198,16 +195,16 @@ class TestClassPurgeFDOChecks: # pylint: disable=fixme
if "handle" in repo["links"] and repo["links"]["handle"] != "": if "handle" in repo["links"] and repo["links"]["handle"] != "":
# Handle system API lags for minutes - have to check # Handle system API lags for minutes - have to check
# against frontend instead # against frontend instead
url = repo["links"]["handle"]["url"].split('api')[0] url = repo["links"]["handle"]["url"]
response = requests.get(f'{url}{pid}', timeout=10) response = requests.get(f'{url}{pid}?auth', timeout=10)
assert response.status_code == HTTPStatus.NOT_FOUND assert response.status_code == HTTPStatus.NOT_FOUND
any_checks_made = True any_checks_made = True
if 'data' in fdo: if 'data' in fdo:
response = requests.get(f'{url}{fdo["data"]}', timeout=10) response = requests.get(f'{url}{fdo["data"]}?auth', timeout=10)
assert response.status_code == HTTPStatus.NOT_FOUND assert response.status_code == HTTPStatus.NOT_FOUND
if 'metadata' in fdo: if 'metadata' in fdo:
response = requests.get( response = requests.get(
f'{url}{fdo["metadata"]}', timeout=10) f'{url}{fdo["metadata"]}?auth', timeout=10)
assert response.status_code == HTTPStatus.NOT_FOUND assert response.status_code == HTTPStatus.NOT_FOUND
if not any_checks_made: if not any_checks_made:
pytest.skip('No checks with outside systems were possible.') pytest.skip('No checks with outside systems were possible.')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment