Skip to content

Commit 0ef742a

Browse files
committed
Just add comments, reorder lines
1 parent 4582bd8 commit 0ef742a

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

t/23_client_simulation.t

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
#!/usr/bin/env perl
22

33
# Just a functional test, whether there are any problems on the client side
4-
# Probably we could also inspect the JSON for any problems for
4+
5+
# We could also inspect the JSON for any problems for
56
# "id" : "scanProblem"
67
# "finding" : "Scan interrupted"
78

89
use strict;
910
use Test::More;
1011
use Data::Dumper;
12+
# if needed: comment this and the lines below in:
1113
# use JSON;
12-
# if we need JSON we need to comment this and the lines below in
1314

1415
my $tests = 0;
1516
my $prg="./testssl.sh";
1617
my $check2run ="--client-simulation -q --ip=one --color 0";
1718
my $uri="";
1819
my $socket_out="";
1920
my $openssl_out="";
20-
# Blacklists we use to trigger an error:
21+
# Pattern we use to trigger an error:
2122
my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found';
2223
my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found';
2324

@@ -30,15 +31,16 @@ STDOUT->autoflush(1);
3031

3132
die "Unable to open $prg" unless -f $prg;
3233

34+
#1
3335
$uri="google.com";
34-
3536
# unlink "tmp.json";
3637
printf "\n%s\n", "Client simulations unit test via sockets --> $uri ...";
3738
$socket_out = `$prg $check2run $uri 2>&1`;
3839
# $socket_json = json('tmp.json');
3940
unlike($socket_out, qr/$socket_regex_bl/, "");
4041
$tests++;
4142

43+
#2 Makes little sense anymore but lets just keep this unit test
4244
# unlink "tmp.json";
4345
printf "\n%s\n", "Client simulations unit test via OpenSSL --> $uri ...";
4446
$openssl_out = `$prg $check2run --ssl-native $uri 2>&1`;
@@ -47,27 +49,19 @@ unlike($openssl_out, qr/$openssl_regex_bl/, "");
4749
$tests++;
4850

4951

52+
#3
5053
$uri="smtp-relay.gmail.com:587";
51-
5254
# unlink "tmp.json";
5355
printf "\n%s\n", "STARTTLS: Client simulations unit test via sockets --> $uri ...";
5456
$socket_out = `$prg $check2run -t smtp $uri 2>&1`;
5557
# $socket_json = json('tmp.json');
5658
unlike($socket_out, qr/$socket_regex_bl/, "");
5759
$tests++;
5860

59-
# commented out, bc of travis' limits
60-
#
6161
# unlink "tmp.json";
62-
#printf "\n%s\n", "STARTTLS: Client simulations unit test via OpenSSL --> $uri ...";
63-
#$openssl_out = `$prg --ssl-native $check2run -t smtp $uri 2>&1`;
64-
## $openssl_json = json('tmp.json');
65-
#unlike($openssl_out, qr/$openssl_regex_bl/, "");
66-
#$tests++;
6762

6863
done_testing($tests);
69-
unlink "tmp.json";
70-
64+
printf "\n";
7165

7266

7367
sub json($) {
@@ -78,5 +72,5 @@ sub json($) {
7872
}
7973

8074

81-
# vim:ts=5:sw=5:expandtab
75+
# vim:ts=5:sw=5:expandtab
8276

0 commit comments

Comments
 (0)