Add tagsToRollback to WebGUI::Test
This commit is contained in:
parent
cc6537b99b
commit
ac77f6f1da
1 changed files with 19 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ my $originalSetting;
|
||||||
my @groupsToDelete;
|
my @groupsToDelete;
|
||||||
my @usersToDelete;
|
my @usersToDelete;
|
||||||
my @storagesToDelete;
|
my @storagesToDelete;
|
||||||
|
my @tagsToRollback;
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
|
||||||
|
|
@ -157,6 +158,9 @@ END {
|
||||||
$stor->delete;
|
$stor->delete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
foreach my $tag (@tagsToRollback) {
|
||||||
|
$tag->rollback;
|
||||||
|
}
|
||||||
if ($ENV{WEBGUI_TEST_DEBUG}) {
|
if ($ENV{WEBGUI_TEST_DEBUG}) {
|
||||||
$Test->diag('Sessions: '.$SESSION->db->quickScalar('select count(*) from userSession'));
|
$Test->diag('Sessions: '.$SESSION->db->quickScalar('select count(*) from userSession'));
|
||||||
$Test->diag('Scratch : '.$SESSION->db->quickScalar('select count(*) from userSessionScratch'));
|
$Test->diag('Scratch : '.$SESSION->db->quickScalar('select count(*) from userSessionScratch'));
|
||||||
|
|
@ -423,6 +427,21 @@ sub storagesToDelete {
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 tagsToRollback ( $tag )
|
||||||
|
|
||||||
|
Push a list of version tags to rollback at the end of the test.
|
||||||
|
|
||||||
|
This is a class method.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub tagsToRollback {
|
||||||
|
my $class = shift;
|
||||||
|
push @tagsToRollback, @_;
|
||||||
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 usersToDelete ( $user, [$user, ...] )
|
=head2 usersToDelete ( $user, [$user, ...] )
|
||||||
|
|
||||||
Push a list of user objects onto the stack of groups to be automatically deleted
|
Push a list of user objects onto the stack of groups to be automatically deleted
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue