Permalink
Browse files

30DaysOfTests: delete command

  • Loading branch information...
conradkdotcom committed Sep 13, 2017
1 parent 6b12052 commit e29108504478d33b89865801ffe78c3cfdfb1270
Showing with 20 additions and 0 deletions.
  1. +20 −0 tests/test-command-delete.sh
@@ -0,0 +1,20 @@
#!/bin/bash
# create a new empty volume for tests
docker volume rm rooster >& /dev/null
docker volume create rooster >& /dev/null
# create the file
printf 'y\nxxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster generate YouTube yt@example.com || exit 1
# check that password is listed
printf 'xxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster list | grep YouTube || exit 1
# delete it
printf 'xxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster delete YouTube || exit 1
# check that password is no longer there
printf 'xxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster list | grep YouTube
if [ "$?" = 0 ]; then
exit 1
fi

0 comments on commit e291085

Please sign in to comment.