File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -526,3 +526,25 @@ def test_postgresql_version(host):
526
526
527
527
# This test always passes, it's just for informational purposes
528
528
assert True
529
+
530
+
531
+ def test_postgrest_logs_no_target_session_attrs_error (host ):
532
+ """Check that PostgREST logs don't contain the target_session_attrs error."""
533
+ # Check recent PostgREST logs for the specific error
534
+ result = run_ssh_command (host ['ssh' ], "sudo journalctl -u postgrest --since '1 hour ago' | grep -i 'target_session_attrs' || true" )
535
+
536
+ if result ['stdout' ].strip ():
537
+ print (f"\n Found target_session_attrs errors in PostgREST logs:\n { result ['stdout' ]} " )
538
+ assert False , "PostgREST logs contain target_session_attrs errors"
539
+ else :
540
+ print ("\n No target_session_attrs errors found in PostgREST logs" )
541
+
542
+ # Also check for the specific error pattern mentioned
543
+ result = run_ssh_command (host ['ssh' ], "sudo journalctl -u postgrest --since '1 hour ago' | grep -i 'invalid target_session_attrs value.*read-only' || true" )
544
+
545
+ if result ['stdout' ].strip ():
546
+ print (f"\n Found specific target_session_attrs read-only error:\n { result ['stdout' ]} " )
547
+ assert False , "PostgREST logs contain invalid target_session_attrs read-only error"
548
+ else :
549
+ print ("No invalid target_session_attrs read-only errors found in PostgREST logs" )
550
+
You can’t perform that action at this time.
0 commit comments