From ad10ef18a56b5b7b4160f41522187dc69515c26b Mon Sep 17 00:00:00 2001 From: yoavrotems Date: Thu, 3 Sep 2020 14:36:43 +0300 Subject: [PATCH] Tidy test 2.2.2 Output was too long, with apt-cache policy there is less output and we only take the line of contains Installed info and the one before (package name) --- cfg/2.0.0/definitions.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cfg/2.0.0/definitions.yaml b/cfg/2.0.0/definitions.yaml index d08459a..2cff40b 100644 --- a/cfg/2.0.0/definitions.yaml +++ b/cfg/2.0.0/definitions.yaml @@ -2792,13 +2792,20 @@ groups: zypper remove xorg-x11* - check: - audit: "apt-cache show xserver-xorg* | grep Package" + audit: "apt-cache policy xserver-xorg* | grep Installed -B1" + use_multiple_values: true constraints: platform: - ubuntu18 - tests: + tests: + bin_op: or test_items: - - flag: "Installed-Size:" + - flag: "Installed" + compare: + op: eq + value: "(none)" + set: true + - flag: "Installed" set: false remediation: | Remove the X Windows System packages using the appropriate package manager or manual installation: