Skip to content

Commit

Permalink
Merge pull request #354 from cPholloway/RE-93
Browse files Browse the repository at this point in the history
Do not return from EA4 blocker check prematurely
  • Loading branch information
toddr authored Jan 19, 2024
2 parents 49a9f06 + 5ff77aa commit 7df9ff0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2024-??-?? - version 20
- #338 - Improve warning and add prompt before starting the upgrade process
- #327 - Block with cPanel accounts have databases on postgresql.
- RE-93 - Do not return from EA4 blocker check prematurely

2024-01-16 - version 19
- #337 - Add blocker if cPanel is not running version 110
Expand Down
2 changes: 1 addition & 1 deletion elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ EOS

INFO("Checking EasyApache profile compatibility with $pretty_distro_name.");

return unless $self->cpev->component('EA4')->backup; # _backup_ea4_profile();
$self->cpev->component('EA4')->backup; # _backup_ea4_profile();
my $stash = cpev::read_stage_file(); # FIXME - move it to a function
my $dropped_pkgs = $stash->{'ea4'}->{'dropped_pkgs'} // {};
return unless scalar keys $dropped_pkgs->%*;
Expand Down
2 changes: 1 addition & 1 deletion lib/Elevate/Blockers/EA4.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sub _blocker_ea4_profile ($self) {

INFO("Checking EasyApache profile compatibility with $pretty_distro_name.");

return unless $self->cpev->component('EA4')->backup; # _backup_ea4_profile();
$self->cpev->component('EA4')->backup; # _backup_ea4_profile();
my $stash = cpev::read_stage_file(); # FIXME - move it to a function
my $dropped_pkgs = $stash->{'ea4'}->{'dropped_pkgs'} // {};
return unless scalar keys $dropped_pkgs->%*;
Expand Down
4 changes: 2 additions & 2 deletions t/blocker-ea4.t
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ my $mock_cpev = Test::MockModule->new('cpev');
my $mock_isea4 = Test::MockFile->file( '/etc/cpanel/ea4/is_ea4' => 1 );
my $type = '';

$mock_compoment_ea4->redefine( backup => 1 );
$mock_compoment_ea4->redefine( backup => sub { return; } );
my $mock_cpev = Test::MockModule->new('cpev');
$mock_cpev->redefine(
_read_stage_file => sub {
Expand Down Expand Up @@ -65,7 +65,7 @@ my $mock_cpev = Test::MockModule->new('cpev');
}

{
$mock_compoment_ea4->redefine( backup => 1 );
$mock_compoment_ea4->redefine( backup => sub { return; } );

my $ea_info_check = sub {
message_seen( 'INFO' => "Checking EasyApache profile compatibility with AlmaLinux 8." );
Expand Down

0 comments on commit 7df9ff0

Please sign in to comment.