From 0b4ed73605e0444c0fc33c821a8aa591c4819ced Mon Sep 17 00:00:00 2001 From: Alessio Date: Sun, 12 Nov 2023 13:35:32 -0800 Subject: [PATCH] Fix integration tests --- cmd/tests.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/tests.sh b/cmd/tests.sh index 2bf2a28..0daa1c6 100755 --- a/cmd/tests.sh +++ b/cmd/tests.sh @@ -204,10 +204,11 @@ test $(sqlite3 twitter.db "select is_content_downloaded from users where handle= # Get a user's feed -malice_id=$(sqlite3 twitter.db "select id from users where handle='michaelmalice'") +tw fetch_user covfefeanon +covfefe_id=$(sqlite3 twitter.db "select id from users where handle like 'covfefeanon'") test $(sqlite3 twitter.db "select count(*) from retweets") = "0" tweet_count_1=$(sqlite3 twitter.db "select count(*) from tweets") -tw get_user_tweets michaelmalice +tw get_user_tweets covfefeanon # Check that there are some retweets rts_count=$(sqlite3 twitter.db "select count(*) from retweets") @@ -215,7 +216,7 @@ test $rts_count -gt "0" # Check that new retweets plus new tweets > 50 tweet_count_2=$(sqlite3 twitter.db "select count(*) from tweets") -test $(sqlite3 twitter.db "select count(*) from retweets where retweeted_by != $malice_id") = "0" +test $(sqlite3 twitter.db "select count(*) from retweets where retweeted_by != $covfefe_id") = "0" test $(($rts_count + $tweet_count_2 - $tweet_count_1)) -gt "50"