Skip to content

Commit

Permalink
Speed up testing process
Browse files Browse the repository at this point in the history
  • Loading branch information
elivlo committed Aug 19, 2021
1 parent ac17330 commit 77f28ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func TestRunWithProgress(t *testing.T) {

compareWholeRun: true,
expectedResult: r,
expectedProgress: []float32{56.66, 81.95, 87.84, 94.43, 97.76, 97.76},
expectedProgress: []float32{3.22, 56.66, 77.02, 81.95, 86.79, 87.84},
expectedErr: nil,
},
}
Expand Down
7 changes: 6 additions & 1 deletion tests/scripts/fake_nmap_delay.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash
input=$1
count=0
while IFS= read -r line
do
echo "$line"
sleep .5
if [ $count -gt 13 ] && [ $count -lt 23 ]
then
sleep 1
fi
(( count++ ))
done < "$input"

0 comments on commit 77f28ef

Please sign in to comment.