diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2019-02-11 17:11:32 +0100 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2019-02-11 17:17:13 +0100 |
| commit | a1dfc656f1ea51cb955c1385c4f24743488becbc (patch) | |
| tree | 08302f969815524642828bbe6f7df25f6eb7f05b | |
| parent | ea491cd56929bc615a28c167040380bc627ebc83 (diff) | |
tests: improve snaps-system-env testimprove-generator-test
In 18.04 we had a regression when we installed the snapd systemd environment generator. Installing it caused LP: #1814355 and the PATH for systemd services looked suddently like: ``` /sbin:/usr/sbin:/bin:/usr/bin:/snap/bin ``` instead of the expected: ``` /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin ``` A better test that checked the *full* expected PATH instead of just the addition of :/snap/bin would have caught this regression. This PR adds the test for the full PATH now.
| -rw-r--r-- | tests/main/snap-system-env/task.yaml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/main/snap-system-env/task.yaml b/tests/main/snap-system-env/task.yaml index 1fa1b234bf..d41a10fe2b 100644 --- a/tests/main/snap-system-env/task.yaml +++ b/tests/main/snap-system-env/task.yaml @@ -1,7 +1,7 @@ summary: Ensure systemd environment generator works # systemd environment generators are only supported on 17.10+ -systems: [ubuntu-18.04-*, ubuntu-18.10-*, ubuntu-19.04-*] +systems: [ubuntu-18.04-*, ubuntu-18.10-*, ubuntu-19.04-*, ubuntu-2*] execute: | # integration test to ensure it works on the real system @@ -26,8 +26,8 @@ execute: | ! MATCH 'PATH=.*/snap/bin' < env.out exit 0 else - # ensure /snap/bin is part of the PATH - MATCH 'PATH=.*:/snap/bin.*' < env.out + # ensure PATH is updated (and check full PATH, see LP: #1814355) + MATCH 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin' < env.out fi # some unit tests |
