def METHOD_NAME(self, get_cloud_interface_mock, caplog):
    """If the WAL cannot be found we exit with status 1."""
    cloud_interface_mock = get_cloud_interface_mock.return_value
    cloud_interface_mock.path = "testfolder/"
    cloud_interface_mock.list_bucket.return_value = [
        "testfolder/test-server/wals/000000080000ABFF/000000080000ABFF000000C1"
    ]
    caplog.set_level(logging.INFO)
    with pytest.raises(SystemExit) as exc:
        cloud_walrestore.main(
            [
                "s3://test-bucket/testfolder/",
                "test-server",
                "000000080000ABFF000000C0",
                "/tmp/000000080000ABFF000000C0",
            ]
        )
    assert exc.value.code == 1
    assert (
        "WAL file 000000080000ABFF000000C0 for server test-server does not exists\n"
        in caplog.text
    )