-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
Here's a reproduction test:
import 'package:postgres/postgres.dart';
import 'package:test/test.dart';
import 'docker.dart';
void main() {
usePostgresDocker();
test('- connect without username throws', () async {
final conn = PostgreSQLConnection('localhost', 5432, 'dart_test');
expect(conn.open(), throwsA(isA<PostgreSQLException>()));
});
// this test will timeout
test('connects without password is fine', () async {
final conn =
PostgreSQLConnection('localhost', 5432, 'dart_test', username: 'dart');
await conn.open();
final res = await conn.query('select 1;');
expect(res.length, 1);
});
}
Actually several tests are failing due to this issue but they can only be seen locally as they are placed after this condition (e.g. Connect with no auth required
test):
postgresql-dart/test/connection_test.dart
Lines 150 to 160 in 5a80ca1
// These tests are disabled, as we'd need to setup ci/pg_hba.conf into the CI | |
// postgres instance first. | |
// TODO: re-enable these tests after pg_hba.conf is used | |
if (Platform.environment.containsKey('GITHUB_ACTION')) { | |
test('NO CONNECTION TEST IS RUNNING.', () { | |
// no-op | |
}); | |
return; | |
} | |
Possible related PR:
- SASL / SCRAM-SHA-256 Authentication #6
- From debugging, it seems the default auth scheme for
postgres
image isscram-sha-256
.
- From debugging, it seems the default auth scheme for
I'm trying to make all tests run successfully, locally.
Metadata
Metadata
Assignees
Labels
No labels