Bug 18991: Fix cleanup in t/db_dependent/Log.t
There is an action_logs entry via logaction() without transaction to be rolled back in t/db_dependent/Log.t. This leaves an entry in action_logs after the test is over. To replicate: 1. prove t/db_dependent/Log.t 2. Observe a new entry in action_logs table To test: 1. Apply patch 2. prove t/db_dependent/Log.t 3. Observe there are no new entries in action_logs Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
ac8e39d1e7
commit
f49f5a67d3
|
|
@ -19,9 +19,13 @@ BEGIN {
|
|||
}
|
||||
my $success;
|
||||
|
||||
# Make sure we can rollback.
|
||||
my $dbh = C4::Context->dbh;
|
||||
$dbh->{AutoCommit} = 0;
|
||||
$dbh->{RaiseError} = 1;
|
||||
|
||||
eval {
|
||||
# FIXME: are we sure there is an member number 1?
|
||||
# FIXME: can we remove this log entry somehow?
|
||||
logaction("MEMBERS","MODIFY",1,"test operation");
|
||||
$success = 1;
|
||||
} or do {
|
||||
|
|
@ -57,11 +61,6 @@ eval {
|
|||
};
|
||||
ok($success, "GetLogs seemed to find ".$success." like our test record in a tighter search");
|
||||
|
||||
# Make sure we can rollback.
|
||||
my $dbh = C4::Context->dbh;
|
||||
$dbh->{AutoCommit} = 0;
|
||||
$dbh->{RaiseError} = 1;
|
||||
|
||||
# We want numbers to be the same between runs.
|
||||
$dbh->do("DELETE FROM action_logs;");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue