File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,7 @@ final class PostgresNIOTests: XCTestCase {
627627 XCTAssertThrowsError ( _ = try auth. wait ( ) ) { error in
628628 guard let postgresError = try ? XCTUnwrap ( error as? PostgresError ) else { return }
629629
630- XCTAssertEqual ( postgresError. code, . invalidPassword)
630+ XCTAssert ( postgresError. code == . invalidPassword || postgresError . code == . invalidAuthorizationSpecification )
631631 }
632632 }
633633
@@ -916,10 +916,14 @@ final class PostgresNIOTests: XCTestCase {
916916 }
917917}
918918
919+ func env( _ name: String ) -> String ? {
920+ getenv ( name) . flatMap { String ( cString: $0) }
921+ }
922+
919923let isLoggingConfigured : Bool = {
920924 LoggingSystem . bootstrap { label in
921925 var handler = StreamLogHandler . standardOutput ( label: label)
922- handler. logLevel = . debug
926+ handler. logLevel = env ( " LOG_LEVEL " ) . flatMap { Logger . Level ( rawValue : $0 ) } ?? . debug
923927 return handler
924928 }
925929 return true
You can’t perform that action at this time.
0 commit comments