diff --git a/test_runner/regress/test_import.py b/test_runner/regress/test_import.py index fbc893f312..1a99d13a0b 100644 --- a/test_runner/regress/test_import.py +++ b/test_runner/regress/test_import.py @@ -120,6 +120,12 @@ def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_build ] ) + # Importing empty file fails + empty_file = os.path.join(test_output_dir, "empty_file") + with open(empty_file, "w") as _: + with pytest.raises(Exception): + import_tar(empty_file, empty_file) + # Importing corrupt backup fails with pytest.raises(Exception): import_tar(corrupt_base_tar, wal_tar)