From f95ce01608b9a1006b5903b38b30a6293bda080f Mon Sep 17 00:00:00 2001 From: alaskowski <alaskowski@ethz.ch> Date: Tue, 18 Jul 2023 09:49:05 +0200 Subject: [PATCH] SSDM-13735: investigating failing pybis test --- .../src/python/tests/systemtest/testcase.py | 1 + .../src/python/tests/test_dataset.py | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/api-openbis-python3-pybis/src/python/tests/systemtest/testcase.py b/api-openbis-python3-pybis/src/python/tests/systemtest/testcase.py index a84d6a55bcc..2caccf76d59 100644 --- a/api-openbis-python3-pybis/src/python/tests/systemtest/testcase.py +++ b/api-openbis-python3-pybis/src/python/tests/systemtest/testcase.py @@ -272,6 +272,7 @@ class TestCase(object): consoleProperties['DSS_ROOT_DIR'] = "%s/data" % installPath for technology in technologies: consoleProperties[technology.upper()] = True + print(f"CONSOLE_PROPERTIES:{consoleProperties}") util.writeProperties(consolePropertiesFile, consoleProperties) util.executeCommand("%s/%s/run-console.sh" % (self.playgroundFolder, installerFileName), "Couldn't install openBIS", consoleInput='admin\nadmin') diff --git a/api-openbis-python3-pybis/src/python/tests/test_dataset.py b/api-openbis-python3-pybis/src/python/tests/test_dataset.py index baefba6ae12..1e7866f2601 100644 --- a/api-openbis-python3-pybis/src/python/tests/test_dataset.py +++ b/api-openbis-python3-pybis/src/python/tests/test_dataset.py @@ -26,9 +26,20 @@ from pybis.things import Things def test_get_datasets(space): # test paging o = space.openbis - current_datasets = o.get_datasets(start_with=1, count=1) - assert current_datasets is not None - assert len(current_datasets) == 1 + + dataset = o.new_dataset( + type="RAW_DATA", + experiment="/DEFAULT/DEFAULT/DEFAULT", + props={"$name": "some good name"}, + ) + dataset.save() + + try: + current_datasets = o.get_datasets(start_with=1, count=1) + assert current_datasets is not None + assert len(current_datasets) == 1 + finally: + dataset.delete() def test_create_delete_dataset(space): -- GitLab