Commit a0511d78 authored by Lionel Walter's avatar Lionel Walter
Browse files

Add some job tests

parent 4afad837
Pipeline #13592 passed with stages
in 6 minutes and 51 seconds
......@@ -123,3 +123,40 @@ def test_kafka_topics(client):
assert len(topics) == number_of_topics_before
assert "py-test1" not in topics
def test_chain_of_jobs(client):
# There are integration tests Institutions, RecordSets and Import Processes
# uuid Import Process 8bd75911-3a1a-414d-aeb7-77518aec9ed2
# uuid Job Text File Validation adf48fb4-16ba-40b2-a207-8ff9d5aac657
# uuid Job Text File Validation Results 28c5dc3f-a01c-441e-bffc-711511286e8b
response = client.post(
'/v1/job/integration-test/integration-test-record-set/' +
'integrationtest00001/text-file-validation/start',
json={
"job-parameters": {
"appDirectory": "import-api-integration-tests",
"drupalJobUuid": "adf48fb4-16ba-40b2-a207-8ff9d5aac657",
"drupalJobLogResultUuid": "28c5dc3f-a01c-441e-bffc-711511286e8b",
}
}
)
assert response.status_code == 201
# check the result :
# https://mb-wf1.memobase.unibas.ch/jsonapi/paragraph/job_log_result/28c5dc3f-a01c-441e-bffc-711511286e8b
# this cannot work right now, because the xml-data-transform job entity doesn't exist in drupal
response = client.post(
'/v1/job/integration-test/integration-test-record-set/' +
'integrationtest00001/xml-data-transform/start',
json={
"job-parameters": {
"drupalJobUuid": "XXX",
"drupalJobLogResultUuid": "XXX",
"xsltFileName": "transform.xslt",
"recordTag": "root",
"identifierFieldName": "identifierMain"
}
})
assert response.status_code == 201
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