Skip to content

Commit

Permalink
Merge pull request #619 from RotherOSS/issue-#617-no_testing_in_DESTROY
Browse files Browse the repository at this point in the history
Issue #617: remove the notes in DESTROY
  • Loading branch information
bschmalhofer authored Nov 4, 2020
2 parents c624faa + 590bfee commit 4a6e133
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions Kernel/System/UnitTest/Helper.pm
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ restores the regular system time behavior.
=cut

sub FixedTimeUnset {
my ($Self) = @_;
my $Self = shift;

undef $FixedTime;

Expand Down Expand Up @@ -559,24 +559,14 @@ sub DESTROY {

# restore environment variable to skip SSL certificate verification if needed
if ( $Self->{RestoreSSLVerify} ) {

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = $Self->{PERL_LWP_SSL_VERIFY_HOSTNAME}; ## no critic

$Self->{RestoreSSLVerify} = 0;

note( 'Restored SSL certificates verification' );
$Self->{RestoreSSLVerify} = 0;
}

# restore database, clean caches
if ( $Self->{RestoreDatabase} ) {
my $RollbackSuccess = $Self->Rollback();
$Kernel::OM->Get('Kernel::System::Cache')->CleanUp();
if ( $RollbackSuccess ) {
note( 'Rolled back all database changes and cleaned up the cache.' );
}
else {
note( 'Problems encountered when rolling back all database changes and cleaning up the cache.' );
}
}

# disable email checks to create new user
Expand Down Expand Up @@ -611,13 +601,6 @@ sub DESTROY {
ValidID => 2,
ChangeUserID => 1,
);

if ( $Success ) {
note( "Set test user $TestUser to invalid" );
}
else {
note( "Problem encountered when setting $TestUser to invalid" );
}
}
}

Expand All @@ -644,13 +627,6 @@ sub DESTROY {
ValidID => 2,
UserID => 1,
);

if ( $Success ) {
note( "Set test customer user $TestCustomerUser to invalid" );
}
else {
note( "Problem encountered when setting $TestCustomerUser to invalid" );
}
}
}

Expand Down

0 comments on commit 4a6e133

Please sign in to comment.