diff --git a/.woodpecker.yml b/.woodpecker.yml index 8fef7af..d17e62e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -16,6 +16,8 @@ pipeline: integration_test: image: offline-twitter/go + secrets: + - offline_twatter_passwd commands: - cd cmd - ./tests.sh diff --git a/cmd/tests.sh b/cmd/tests.sh index 3f9cebe..9c444d4 100755 --- a/cmd/tests.sh +++ b/cmd/tests.sh @@ -5,6 +5,9 @@ set -x PS4='+(${BASH_SOURCE}:${LINENO}): ' +env + + FAKE_VERSION="1.100.3489" ./compile.sh $FAKE_VERSION @@ -300,8 +303,7 @@ tw unfollow cernovich test "$(sqlite3 twitter.db "select count(*) from users where is_followed = 1")" = "0" # Testing login -# TODO authentication: use an environment var for the password -tw login offline_twatter S1pKIW#eRT016iA@OFcK +tw login offline_twatter "$OFFLINE_TWATTER_PASSWD" test -f Offline_Twatter.session test "$(jq .UserHandle Offline_Twatter.session)" = "\"Offline_Twatter\"" test "$(jq .IsAuthenticated Offline_Twatter.session)" = "true"