Skip to content

Commit

Permalink
Fix snapper_zypp test
Browse files Browse the repository at this point in the history
  • Loading branch information
cedvid committed Feb 5, 2025
1 parent bce298f commit 8698700
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/console/snapper_zypp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ use version_utils 'is_sle';
use Test::Assert 'assert_equals';

sub get_snapshot_id {
my $snapshot_id = is_sle("<=12-SP5") ? '$3' : '$1';
return script_output("snapper ls | awk 'END {print $snapshot_id}'");
my $snapshot_id = is_sle("<=12-SP5") ? qx(snapper ls | awk 'END {print \$3}') : qx(snapper ls --disable-used-space --columns number | tail -n1);
record_info("debug", $snapshot_id);
chomp($snapshot_id);
return $snapshot_id;
}

sub run_zypper_cmd {
Expand Down

0 comments on commit 8698700

Please sign in to comment.