Skip to content

Commit 6bf375e

Browse files
committed
chore: checks
1 parent 2256c90 commit 6bf375e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Diff for: testinfra/test_ami_nix.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,17 @@ def get_ssh_connection(instance_ip, ssh_identity_file, max_retries=10):
292292
)
293293

294294
def is_healthy(host, instance_ip, ssh_identity_file) -> bool:
295-
postgres_logs = host.run("journalctl -u postgresql")
296-
logger.warning(f"PostgreSQL logs: {postgres_logs.stdout}")
295+
status_checks = [
296+
"dpkg -l | grep postgresql",
297+
"systemctl status postgresql",
298+
"ls -la /var/lib/postgresql",
299+
"ps aux | grep postgres"
300+
]
301+
302+
for check in status_checks:
303+
result = host.run(check)
304+
logger.warning(f"{check} output: {result.stdout}")
305+
297306

298307
health_checks = [
299308
(

0 commit comments

Comments
 (0)