Skip to content

Commit

Permalink
Fix pending dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Mar 29, 2024
1 parent 9776aa4 commit b12eede
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions functions/test_functions.sh
Original file line number Diff line number Diff line change
@@ -59,7 +59,8 @@ function shellcheck {

function test_retrieval_validate {
script_to_test="$1"
[[ "$script_to_test" == 'retrieval' ]] && { mkdir -p data/pending; rm data/pending/*; } # Initialize pending directory
[[ -d data/pending ]] && rm -r data/pending # Initialize pending directory
[[ "$script_to_test" == 'retrieval' ]] && mkdir data/pending

if [[ "$script_to_test" == 'retrieval' ]]; then
# Test removal of known dead domains
@@ -209,7 +210,8 @@ function test_retrieval_validate {
}

function test_toplist_check {
mkdir -p data/pending && rm data/pending/* # Initialize pending directory
[[ -d data/pending ]] && rm -r data/pending # Initialize pending directory
mkdir data/pending
: > "$whitelist_file" # Clear whitelist file
printf "google.com\n" > data/pending/domains_google_search_toplist-test.tmp # Input
printf "toplist,google.com\n" > out_log.txt # Expected output

0 comments on commit b12eede

Please sign in to comment.