@@ -427,9 +427,9 @@ def is_healthy(ssh) -> bool:
427427def test_postgrest_is_running (host ):
428428 """Check if postgrest service is running using our SSH connection."""
429429 result = run_ssh_command (host ["ssh" ], "systemctl is-active postgrest" )
430- assert (
431- result [ "succeeded" ] and result [ "stdout" ]. strip () == "active "
432- ), "PostgREST service is not running"
430+ assert result [ "succeeded" ] and result [ "stdout" ]. strip () == "active" , (
431+ "PostgREST service is not running "
432+ )
433433
434434
435435def test_postgrest_responds_to_requests (host ):
@@ -571,9 +571,9 @@ def test_postgresql_version(host):
571571 if version_match :
572572 major_version = int (version_match .group (1 ))
573573 print (f"PostgreSQL major version: { major_version } " )
574- assert (
575- major_version >= 14
576- ), f"PostgreSQL version { major_version } is less than 14"
574+ assert major_version >= 14 , (
575+ f"PostgreSQL version { major_version } is less than 14"
576+ )
577577 else :
578578 assert False , "Could not parse PostgreSQL version number"
579579 else :
@@ -603,9 +603,9 @@ def test_libpq5_version(host):
603603 if version_match :
604604 major_version = int (version_match .group (1 ))
605605 print (f"libpq5 major version: { major_version } " )
606- assert (
607- major_version >= 14
608- ), f"libpq5 version { major_version } is less than 14"
606+ assert major_version >= 14 , (
607+ f"libpq5 version { major_version } is less than 14"
608+ )
609609 else :
610610 print ("Could not parse libpq5 version from dpkg output" )
611611 else :
@@ -638,9 +638,9 @@ def test_libpq5_version(host):
638638 if version_match :
639639 major_version = int (version_match .group (1 ))
640640 print (f"psql/libpq major version: { major_version } " )
641- assert (
642- major_version >= 14
643- ), f"psql/libpq version { major_version } is less than 14"
641+ assert major_version >= 14 , (
642+ f"psql/libpq version { major_version } is less than 14"
643+ )
644644 else :
645645 print ("Could not parse psql version" )
646646
@@ -801,7 +801,9 @@ def test_postgrest_read_only_session_attrs(host):
801801 print (
802802 f"\n Found 'session is not read-only' errors in PostgREST logs:\n { result ['stdout' ]} "
803803 )
804- assert False , "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode"
804+ assert False , (
805+ "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode"
806+ )
805807 else :
806808 print ("\n No 'session is not read-only' errors found in PostgREST logs" )
807809
0 commit comments