Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Apr 2, 2024
1 parent fe13d7b commit 4358550
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion functions/check_dead.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ check_alive() {
# $1: file to process
# Output:
# dead.tmp
# exit status 0 (if dead domains found)
# exit status 1 (if dead domains not found)
find_dead() {
sed 's/^/||/; s/$/^/' "$1" > formatted_domains.tmp
Expand Down
1 change: 0 additions & 1 deletion functions/check_parked.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ add_unparked_domains() {
# $1: file to process
# Output:
# parked_domains.tmp
# exit status 0 (if parked domains found)
# exit status 1 (if parked domains not found)
retrieve_parked() {
# Truncate temporary files between runs
Expand Down
10 changes: 5 additions & 5 deletions functions/test_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ TEST_RETRIEVE_VALIDATE() {
mv xab data/pending/domains_google_search_search-term-1.tmp
mv xac data/pending/domains_google_search_search-term-2.tmp

# Prepare sample raw light file
cp "$RAW" "$RAW_LIGHT"

# Run retrieval script
run_script retrieve_domains.sh
fi
Expand All @@ -135,7 +138,7 @@ TEST_RETRIEVE_VALIDATE() {
if [[ "$script_to_test" == 'validate' ]]; then
# Use input.txt as sample raw files to test
cp input.txt "$RAW"
cp input.txt "$RAW_LIGHT"
cp "$RAW" "$RAW_LIGHT"

# Expected output for light version
cp out_raw.txt out_raw_light.txt
Expand Down Expand Up @@ -487,7 +490,6 @@ test_source_log() {

# TEST: exclusion of specific sources from light version
test_light_build() {
cp "$RAW" "$RAW_LIGHT"
# INPUT
printf "raw-light-test.com\n" >> data/pending/domains_guntab.com.tmp
# EXPECTED OUTPUT
Expand Down Expand Up @@ -600,9 +602,7 @@ run_script() {
printf "%s\n" "----------------------------------------------------------------------"

# Return 1 if script has an exit status of 1
if [[ "$errored" == true ]]; then
return 1
fi
[[ "$errored" == true ]] && return 1 || return 0
}

# Function 'check_and_exit' is a shell wrapper that checks if the script
Expand Down

0 comments on commit 4358550

Please sign in to comment.