From 9c06578c37ff77b70b9d978d48528df13e13530f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 23 Apr 2024 16:13:46 +0000 Subject: Drop sudo-related envvars in testing framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our autoremoval-advertisment is modified by SUDO_USER as if the current apt call was made with sudo it seems a good idea to show the ad with sudo as well. That is annoying for our tests through as normally the tests are run locally or by autopkgtest without sudo, but in Gitlab CI we use it (to run our tests as user… as we are already root) and so individual tests had to deal with this. That is annoying and really not needed as we can have our autoremove test check that this ad gets displayed the right way and ignore it the rest of the time. --- test/integration/test-external-dependency-solver-protocol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/integration/test-external-dependency-solver-protocol') diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index 485a77068..ca6a5ae8b 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -113,17 +113,13 @@ Remv somestuff [1] Remv cool [1] Remv stuff [1]' aptget autoremove --solver apt somestuff -s -AUTOREMOVE='apt autoremove' -if [ -n "$SUDO_USER" ]; then - AUTOREMOVE="sudo $AUTOREMOVE" -fi testsuccessequal "Reading package lists... Building dependency tree... Reading state information... Execute external solver... The following package was automatically installed and is no longer required: stuff -Use '$AUTOREMOVE' to remove it. +Use 'apt autoremove' to remove it. The following packages will be REMOVED: cool* somestuff* 0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded. -- cgit v1.2.3-70-g09d2