Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: implement TODO in main/writable-areas from 2016 #13883

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/main/writable-areas/data-writer/bin/write-data
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ echo "hello common" > "$SNAP_COMMON/$1"
echo "Writing to SNAP_DATA"
echo "hello data" > "$SNAP_DATA/$1"

# TODO: As soon as `snap run` is used (which creates this directory), uncomment
# the following lines:
# echo "Writing to SNAP_USER_COMMON"
# echo "hello user common" > $SNAP_USER_COMMON/$1
echo "Writing to SNAP_USER_COMMON"
echo "hello user common" > "$SNAP_USER_COMMON/$1"

echo "Writing to SNAP_USER_DATA"
echo "hello user data" > "$SNAP_USER_DATA/$1"
8 changes: 2 additions & 6 deletions tests/main/writable-areas/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ execute: |
[ -f /var/snap/data-writer/x1/from-app ]
[ -f /var/snap/data-writer/common/from-app ]
[ -f /root/snap/data-writer/x1/from-app ]
# TODO: As soon as `snap run` is used (which creates this directory),
# uncomment the following line:
#[ -f /root/snap/data-writer/common/from-app ]
[ -f /root/snap/data-writer/common/from-app ]

echo "Waiting for data writer service to finish..."
retry -n 20 --wait 1 sh -c 'test -f /root/snap/data-writer/x1/from-service'

echo "Services can write to writable areas"
[ -f /var/snap/data-writer/x1/from-service ]
[ -f /var/snap/data-writer/common/from-service ]
# TODO: As soon as `snap run` is used (which creates this directory),
# uncomment the following line:
#[ -f /root/snap/data-writer/common/from-service ]
[ -f /root/snap/data-writer/common/from-service ]