mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-29 12:59:44 +01:00
Shutup Travis
... by adding the formerly intruoced "DEBUG" statement as a filter. Note: "DEBUG" can now / should now be taken preferably for extra output on debug level 1. Replacing badssl.com by testssl.net. The former needed almost 5 min for a run, whereas one IP of testssl.net needs ~80 secs. With --fast even less.
This commit is contained in:
parent
952231dd94
commit
26a8f23ec1
@ -9,12 +9,12 @@ use Data::Dumper;
|
||||
|
||||
my $tests = 0;
|
||||
my $prg="./testssl.sh";
|
||||
my $uri="badssl.com";
|
||||
my $uri="testssl.net";
|
||||
my $out="";
|
||||
my $html="";
|
||||
my $debughtml="";
|
||||
my $edited_html="";
|
||||
my $check2run="--color 0 --htmlfile tmp.html";
|
||||
my $check2run="--fast --ip=one --color 0 --htmlfile tmp.html";
|
||||
|
||||
die "Unable to open $prg" unless -f $prg;
|
||||
|
||||
@ -22,7 +22,7 @@ printf "\n%s\n", "Doing HTML output checks";
|
||||
unlink 'tmp.html';
|
||||
|
||||
#1
|
||||
printf "%s\n", " .. running $prg against $uri to create HTML and terminal outputs (may take 2~3 minutes)";
|
||||
printf "%s\n", " .. running $prg against \"$uri\" to create HTML and terminal outputs (may take ~2 minutes)";
|
||||
# specify a TERM_WIDTH so that the two calls to testssl.sh don't create HTML files with different values of TERM_WIDTH
|
||||
$out = `TERM_WIDTH=120 $prg $check2run $uri`;
|
||||
$html = `cat tmp.html`;
|
||||
@ -49,7 +49,7 @@ cmp_ok($edited_html, "eq", $out, "HTML file matches terminal output");
|
||||
$tests++;
|
||||
|
||||
#2
|
||||
printf "\n%s\n", " .. running $prg against $uri with --debug 4 to create HTML output (may take another 2~3 minutes)";
|
||||
printf "\n%s\n", " .. running again $prg against \"$uri\", now with --debug 4 to create HTML output (may take another ~2 minutes)";
|
||||
# Redirect stderr to /dev/null in order to avoid some unexplained "date: invalid date" error messages
|
||||
$out = `TERM_WIDTH=120 $prg $check2run --debug 4 $uri 2> /dev/null`;
|
||||
$debughtml = `cat tmp.html`;
|
||||
@ -68,6 +68,7 @@ $debughtml =~ s/HTTP clock skew \+?-?[0-9]* /HTTP clock skew
|
||||
|
||||
$debughtml =~ s/ Pre-test: .*\n//g;
|
||||
$debughtml =~ s/.*OK: below 825 days.*\n//g;
|
||||
$debughtml =~ s/.*DEBUG:.*\n//g;
|
||||
|
||||
printf "\n%s\n", " .. checking that using the --debug option doesn't affect the HTML file";
|
||||
cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug");
|
||||
|
Loading…
Reference in New Issue
Block a user