Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused 'dsn' function and its usage #4928

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/OpenQA/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ sub disconnect_db () {
$SINGLETON = undef;
}

sub dsn {
my $self = shift;
return $self->storage->connect_info->[0]->{dsn};
}

sub deploy ($self, $force_overwrite = 0) {
# lock config file to ensure only one thing will deploy/upgrade DB at once
# we use a file in prjdir/db as the lock file as the install process and
Expand Down
10 changes: 2 additions & 8 deletions lib/OpenQA/Shared/Plugin/Gru.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,8 @@ sub register ($self, $app, $config) {
my $schema = $app->schema;

my $conn = Mojo::Pg->new;
if (ref $schema->storage->connect_info->[0] eq 'HASH') {
$self->dsn($schema->dsn);
$conn->username($schema->storage->connect_info->[0]->{user});
$conn->password($schema->storage->connect_info->[0]->{password});
}
else {
$self->dsn($schema->storage->connect_info->[0]);
}
my $connect_info = $schema->storage->connect_info->[0];
$self->dsn($connect_info);
$conn->dsn($self->dsn());

# set the search path in accordance with the test setup done in OpenQA::Test::Database
Expand Down
Loading