summaryrefslogtreecommitdiff
path: root/tests
diff options
authorMichael Vogt <mvo@ubuntu.com>2016-09-12 17:29:23 +0200
committerMichael Vogt <mvo@ubuntu.com>2016-09-12 17:31:59 +0200
commit2f7e84a053e127c5041b74d44e8a1e19f1a74774 (patch)
tree260c90db9b6d67421133582d9ce8712a821e508f /tests
parent3153cf292011583d8373a649e96db24db7b12a16 (diff)
improve test for writable-area daemon
Diffstat (limited to 'tests')
-rw-r--r--tests/main/writable-areas/task.yaml10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/main/writable-areas/task.yaml b/tests/main/writable-areas/task.yaml
index 9439ea9df9..4c93e18a04 100644
--- a/tests/main/writable-areas/task.yaml
+++ b/tests/main/writable-areas/task.yaml
@@ -7,11 +7,6 @@ restore: |
rm data-writer_1.0_all.snap
execute: |
- wait_for_service(){
- local service_name=$1
- local state=$2
- while ! systemctl show -p ActiveState $service_name | grep -q "ActiveState=$state"; do sleep 1; done
- }
snap install --dangerous data-writer_1.0_all.snap
echo "Apps can write to writable areas"
@@ -25,7 +20,10 @@ execute: |
echo "Waiting for data writer service to finish..."
unit="snap.data-writer.service.service"
- wait_for_service $unit inactive
+ while ! systemctl status $unit | grep -q "Writing to SNAP_USER_DATA"; do
+ systemctl status $unit || true
+ sleep 1
+ done
echo "Services can write to writable areas"
[ -f /var/snap/data-writer/x1/from-service ]