Commit fac02b87 authored by Luc Yriarte's avatar Luc Yriarte
Browse files

Merge branch 'common-integration-tests' into 'master'

Fusion basic integration CRUD tests, with recordIdVersions check on local FS

See merge request !150
parents 73bbee47 cb9c7bcf
Pipeline #49685 passed with stages
in 11 minutes and 49 seconds
......@@ -112,6 +112,7 @@ class StorageRecordServiceBlobStorage:
# manual for now
return CreateUpdateRecordsResponse(recordCount=len(record_list),
recordIds=[record.id for record in record_list],
recordIdVersions=[record.version for record in record_list],
skipped_record_ids=[])
async def get_record_version(self,
......
......@@ -46,16 +46,9 @@ def test_crud_create_record(get_env, kind):
resobj = result.get_response_obj()
assert resobj.recordCount == 1
assert len(resobj.recordIds) == 1
assert len(resobj.recordIdVersions) == 1
get_env.set(f'{kind}_record_id', resobj.recordIds[0]) # stored the record id for the following tests
@pytest.mark.tag('crud', 'smoke')
@pytest.mark.parametrize(
'kind', [pytest.param(k, marks=pytest.mark.dependency(name=f'test_create_record_{k}')) for k in kind_list])
def test_crud_create_record_check_versions(get_env, kind):
result = build_request(f'crud.{kind}.create_{kind}').call(get_env)
result.assert_ok()
resobj = result.get_response_obj()
assert len(resobj.recordIdVersions) == 1
@pytest.mark.tag('basic', 'crud', 'smoke')
@pytest.mark.parametrize('kind', param_kind_depend_on_create)
......
......@@ -34,16 +34,9 @@ def test_crud_create_record(with_wdms_env, kind):
resobj = result.get_response_obj()
assert resobj.recordCount == 1
assert len(resobj.recordIds) == 1
assert len(resobj.recordIdVersions) == 1
with_wdms_env.set(f'{kind}_record_id', resobj.recordIds[0]) # stored the record id for the following tests
@pytest.mark.tag('crud', 'smoke')
@pytest.mark.parametrize(
'kind', [pytest.param(k, marks=pytest.mark.dependency(name=f'test_create_record_{k}')) for k in kind_list])
def test_crud_create_record_check_versions(with_wdms_env, kind):
result = build_request(f'crud.{kind}.create_{kind}').call(with_wdms_env)
result.assert_ok()
resobj = result.get_response_obj()
assert len(resobj.recordIdVersions) == 1
@pytest.mark.tag('basic', 'crud', 'smoke')
@pytest.mark.parametrize('kind', param_kind_depend_on_create)
......
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