Skip to content

Commit 1f4f065

Browse files
committed
test: more debugging
1 parent 90d79b4 commit 1f4f065

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

testinfra/test_ami_nix.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,13 @@ def is_healthy(host, instance_ip, ssh_identity_file) -> bool:
302302
# Then check if the socket directory exists and has correct permissions
303303
h.run("sudo ls -la /run/postgresql"),
304304
# Then try pg_isready
305-
h.run("sudo -u postgres /usr/bin/pg_isready -U postgres")
305+
h.run("sudo -u postgres /usr/bin/pg_isready -U postgres"),
306+
# Check Nix profile setup
307+
h.run("echo 'Check Nix profile setup'"),
308+
h.run("sudo -u postgres ls -la /home/postgres/.nix-profile"),
309+
h.run("sudo -u postgres ls -la /home/postgres/.nix-profile/bin"),
310+
h.run("sudo -u postgres test -x /home/postgres/.nix-profile/bin/switch_pg_cron_version"),
311+
h.run("sudo -u postgres cat /home/postgres/.nix-profile/bin/switch_pg_cron_version")
306312
),
307313
),
308314
(

0 commit comments

Comments
 (0)