def METHOD_NAME(self, _get_cloud_interface_mock, caplog):
    """If an invalid wal name is provided we exit with status 3."""
    with pytest.raises(SystemExit) as exc:
        cloud_walrestore.main(
            [
                "s3://test-bucket/testfolder/",
                "test-server",
                "not_a_valid_wal_name",
                "/tmp/000000080000ABFF000000C1",
            ]
        )
    assert exc.value.code == 3
    assert "not_a_valid_wal_name is an invalid name for a WAL file\n" in caplog.text