Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions templates/pgbackrest.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
backup-standby=y
compress-type=zst
lock-path=/tmp
log-level-stderr=warn
log-path={{ log_path }}
repo1-retention-full-type=time
repo1-retention-full={{ retention_full }}
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/test_backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,13 @@ def test_render_pgbackrest_conf_file(harness, tls_ca_chain_filename):

# Check the template is opened read-only in the call to open.
assert mock.call_args_list[0][0] == ("templates/pgbackrest.conf.j2",)
rendered_pgbackrest_conf = next(
call_args[0][1]
for call_args in _render_file.call_args_list
if call_args[0][0]
== "/var/snap/charmed-postgresql/current/etc/pgbackrest/pgbackrest.conf"
)
assert "log-level-stderr=warn" in rendered_pgbackrest_conf

# Get the expected content from a file.
with open("templates/pgbackrest.conf.j2") as file:
Expand Down
Loading