dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
Blob Blame History Raw
From 740dd8e0a0c503980894968006a43fa05039e299 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Tue, 14 Jun 2022 09:01:00 +0900
Subject: [PATCH] test: drop unnecessary --no-pager option

(cherry picked from commit 8ed2103306fa6b3dcaf8d810e65e8957553ef752)

Related: #2087652
---
 test/units/testsuite-45.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/units/testsuite-45.sh b/test/units/testsuite-45.sh
index d0d1ef2eb4..2069d2437f 100755
--- a/test/units/testsuite-45.sh
+++ b/test/units/testsuite-45.sh
@@ -25,7 +25,7 @@ test_timezone() {
 
     if [[ -n "$ORIG_TZ" ]]; then
         echo 'reset timezone to original'
-        assert_eq "$(timedatectl --no-pager set-timezone "$ORIG_TZ" 2>&1)" ""
+        assert_eq "$(timedatectl set-timezone "$ORIG_TZ" 2>&1)" ""
         assert_eq "$(readlink /etc/localtime | sed 's#^.*zoneinfo/##')" "$ORIG_TZ"
     fi
 }
@@ -206,11 +206,11 @@ EOF
     timedatectl set-ntp false
     for ((i=0;i<10;i++)); do
         if (( i != 0 )); then sleep 1; fi
-        if [[ "$(systemctl --no-pager show systemd-timesyncd --property ActiveState)" == "ActiveState=inactive" ]]; then
+        if [[ "$(systemctl show systemd-timesyncd --property ActiveState)" == "ActiveState=inactive" ]]; then
             break;
         fi
     done
-    assert_eq "$(systemctl --no-pager show systemd-timesyncd --property ActiveState)" "ActiveState=inactive"
+    assert_eq "$(systemctl show systemd-timesyncd --property ActiveState)" "ActiveState=inactive"
     assert_ntp "false"
     assert_rc 3 systemctl is-active --quiet systemd-timesyncd
 
@@ -221,11 +221,11 @@ EOF
     assert_ntp "true"
     for ((i=0;i<10;i++)); do
         if (( i != 0 )); then sleep 1; fi
-        if [[ "$(systemctl --no-pager show systemd-timesyncd --property ActiveState)" == "ActiveState=active" ]]; then
+        if [[ "$(systemctl show systemd-timesyncd --property ActiveState)" == "ActiveState=active" ]]; then
             break;
         fi
     done
-    assert_eq "$(systemctl --no-pager show systemd-timesyncd --property ActiveState)" "ActiveState=active"
+    assert_eq "$(systemctl show systemd-timesyncd --property ActiveState)" "ActiveState=active"
     assert_rc 0 systemctl is-active --quiet systemd-timesyncd
 
     echo 're-disable NTP'