diff options
| author | Jon Robertson <jonrober@stanford.edu> | 2013-01-31 14:38:25 -0800 | 
|---|---|---|
| committer | Russ Allbery <rra@stanford.edu> | 2013-01-31 15:58:05 -0800 | 
| commit | a30984dc9602e5a7efe9556f337eb21dbcec8319 (patch) | |
| tree | cc9c1f3aee04187c4c700569ac981fdf71f1bfca /perl/Wallet | |
| parent | 22f1c07a21bc6155450de35c838855f73db35d05 (diff) | |
Fixed errors with Keytab object and its tests
perl/Wallet/Object/Keytab.pm was using the wrong value for the database
handle in some places (trying to load as a subroutine rather than part
of the object).  Also, the keytab.t tests were attempting to run against
the DBIx::Class object rather than a direct dbh handle that they
expected.
Change-Id: Ifbb8b110d559f3ba867fc5b0dc3933fd2d4fd484
Reviewed-on: https://gerrit.stanford.edu/731
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'perl/Wallet')
| -rw-r--r-- | perl/Wallet/Object/Keytab.pm | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/perl/Wallet/Object/Keytab.pm b/perl/Wallet/Object/Keytab.pm index 083dae6..b50fb6e 100644 --- a/perl/Wallet/Object/Keytab.pm +++ b/perl/Wallet/Object/Keytab.pm @@ -140,8 +140,8 @@ sub sync_set {          eval {              my $name = $self->{name};              my %search = (ks_name => $name); -            my $sync_rs = $self->dbh->resultset('KeytabSync') -                ->search (\%search); +            my $sync_rs = $self->{dbh}->resultset('KeytabSync') +                ->find (\%search);              if (defined $sync_rs) {                  my $target = $sync_rs->ks_target;                  $sync_rs->delete; @@ -167,8 +167,8 @@ sub sync_list {      eval {          my %search = (ks_name => $self->{name});          my %attrs = (order_by => 'ks_target'); -        my @syncs = $self->dbh->resultset('KeytabSync')->search (\%search, -                                                                 \%attrs); +        my @syncs = $self->{dbh}->resultset('KeytabSync')->search (\%search, +                                                                   \%attrs);          for my $sync_rs (@syncs) {              push (@targets, $sync_rs->ks_target);          } | 
