From cd0e5ccbe61d3839c668ea9b38bb5e196c605909 Mon Sep 17 00:00:00 2001 From: Jarkko Jaakola Date: Wed, 18 Sep 2024 22:00:37 +0300 Subject: [PATCH] test --- GNUmakefile | 2 +- tests/integration/backup/test_v3_backup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 9d5c53a06..7bda85495 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -66,7 +66,7 @@ unit-tests: karapace/version.py venv/.deps unit-tests: export PYTEST_ARGS ?= integration-tests: karapace/version.py venv/.deps rm -fr runtime/* - $(PYTHON) -m pytest -s -vvv $(PYTEST_ARGS) tests/integration/ + $(PYTHON) -m pytest -s -vvv $(PYTEST_ARGS) "tests/integration/backup/test_v3_backup.py::test_backup_restoration_fails_when_topic_does_not_exist_and_skip_creation_is_true" rm -fr runtime/* .PHONY: clean diff --git a/tests/integration/backup/test_v3_backup.py b/tests/integration/backup/test_v3_backup.py index 86244e116..bec63d03c 100644 --- a/tests/integration/backup/test_v3_backup.py +++ b/tests/integration/backup/test_v3_backup.py @@ -585,13 +585,14 @@ def __exit__(self, exc_type, exc_value, exc_traceback): with patch("karapace.backup.api._producer") as p: p.return_value = LowTimeoutProducer() - with pytest.raises(BackupDataRestorationError): + with pytest.raises(BackupDataRestorationError) as excinfo: api.restore_backup( config=config, backup_location=metadata_path, topic_name=TopicName(topic_name), skip_topic_creation=True, ) + excinfo.match("UnknownTopicOrPartitionError") def test_backup_restoration_fails_when_producer_send_fails_on_unknown_topic_or_partition(