Skip to content

Commit 2ad70f9

Browse files
committed
fix(testcontainers): add option to compress backup
Signed-off-by: Fatih Acar <[email protected]>
1 parent 5998cb0 commit 2ad70f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python_testcontainers/infrahub_testcontainers/container.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,17 @@ def get_services_port(self) -> dict[str, int]:
239239
for service_name, service_data in INFRAHUB_SERVICES.items()
240240
}
241241

242-
def database_create_backup(self, backup_name: str = "neo4j_database.backup", dest_dir: Path | None = None) -> None:
242+
def database_create_backup(
243+
self, backup_name: str = "neo4j_database.backup", dest_dir: Path | None = None, compress: bool = False
244+
) -> None:
243245
assert self.use_neo4j_enterprise
244246

245247
self.exec_in_container(
246248
command=[
247249
"neo4j-admin",
248250
"database",
249251
"backup",
250-
"--compress=false",
252+
f"--compress={'true' if compress else 'false'}",
251253
"--to-path",
252254
str(self.internal_backup_dir),
253255
],

0 commit comments

Comments
 (0)