File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -507,3 +507,22 @@ def test_postgrest_ending_empty_key_query_parameter_is_removed(host):
507507 },
508508 )
509509 assert res .ok
510+
511+
512+ def test_postgresql_version (host ):
513+ """Print the PostgreSQL version being tested."""
514+ result = run_ssh_command (host ['ssh' ], "sudo -u postgres psql -c 'SELECT version();'" )
515+ if result ['succeeded' ]:
516+ print (f"\n PostgreSQL Version:\n { result ['stdout' ]} " )
517+ else :
518+ print (f"\n Failed to get PostgreSQL version: { result ['stderr' ]} " )
519+
520+ # Also get the version from the command line
521+ result = run_ssh_command (host ['ssh' ], "sudo -u postgres psql --version" )
522+ if result ['succeeded' ]:
523+ print (f"PostgreSQL Client Version: { result ['stdout' ].strip ()} " )
524+ else :
525+ print (f"Failed to get PostgreSQL client version: { result ['stderr' ]} " )
526+
527+ # This test always passes, it's just for informational purposes
528+ assert True
You can’t perform that action at this time.
0 commit comments