Permalink
Browse files

30DaysOfTests: generate command

  • Loading branch information...
conradkdotcom committed Sep 13, 2017
1 parent 6aeb1e7 commit f359eb875036a6492c2f71fc0b586ad8500fa5c8
Showing with 20 additions and 0 deletions.
  1. +20 −0 tests/test-command-generate.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
# get initial password
out1="`printf 'xxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster get -s youtube 2>&1`"
# password exists
printf 'xxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster generate YouTube test@example.com
if [ $? = 0 ]; then
exit 1
fi
# check that it has changed
printf 'xxxx\n' | docker run --rm -i -v rooster:/home/rooster rooster get -s youtube

0 comments on commit f359eb8

Please sign in to comment.