async def test_backup_get(registry_async, registry_async_client): _ = await insert_data(registry_async_client) # Get the backup backup_location = os.path.join(os.path.dirname(registry_async.config_path), "schemas.log") sb = SchemaBackup(registry_async.config_path, backup_location) sb.request_backup() # The backup file has been created assert os.path.exists(backup_location)
async def test_backup_get(registry_async_client, kafka_servers: KafkaServers, tmp_path: Path): _ = await insert_data(registry_async_client) # Get the backup backup_location = tmp_path / "schemas.log" config = set_config_defaults({"bootstrap_uri": kafka_servers.bootstrap_servers}) sb = SchemaBackup(config, str(backup_location)) sb.request_backup() # The backup file has been created assert os.path.exists(backup_location)
async def test_backup_get(karapace, aiohttp_client): kc, datadir = karapace(topic_name="get_schemas") client = await aiohttp_client(kc.app) c = Client(client=client) _ = await insert_data(c) # Get the backup backup_location = os.path.join(datadir, "schemas.log") sb = SchemaBackup(kc.config_path, backup_location) sb.request_backup() # The backup file has been created assert os.path.exists(backup_location)