@@ -19,19 +19,13 @@ var tls_port = 6380;
19
19
// Use skip instead of returning to indicate what tests really got skipped
20
20
var skip = false ;
21
21
22
- // Wait until stunnel4 is in the travis whitelist
23
- // Check: https://github.com/travis-ci/apt-package-whitelist/issues/403
24
- // If this is merged, remove the travis env checks
25
22
describe ( 'TLS connection tests' , function ( ) {
26
23
27
24
before ( function ( done ) {
28
25
// Print the warning when the tests run instead of while starting mocha
29
26
if ( process . platform === 'win32' ) {
30
27
skip = true ;
31
28
console . warn ( '\nStunnel tests do not work on windows atm. If you think you can fix that, it would be warmly welcome.\n' ) ;
32
- } else if ( process . env . TRAVIS === 'true' ) {
33
- skip = true ;
34
- console . warn ( '\nTravis does not support stunnel right now. Skipping tests.\nCheck: https://github.com/travis-ci/apt-package-whitelist/issues/403\n' ) ;
35
29
}
36
30
if ( skip ) return done ( ) ;
37
31
helper . stopStunnel ( function ( ) {
@@ -58,7 +52,7 @@ describe('TLS connection tests', function () {
58
52
client = redis . createClient ( {
59
53
connect_timeout : connect_timeout ,
60
54
port : tls_port ,
61
- tls : tls_options
55
+ tls : utils . clone ( tls_options )
62
56
} ) ;
63
57
var time = 0 ;
64
58
assert . strictEqual ( client . address , '127.0.0.1:' + tls_port ) ;
@@ -109,12 +103,14 @@ describe('TLS connection tests', function () {
109
103
client . get ( 'foo' , helper . isString ( 'bar' , done ) ) ;
110
104
} ) ;
111
105
112
- describe ( 'using rediss as url protocol' , function ( done ) {
106
+ describe ( 'using rediss as url protocol' , function ( ) {
113
107
var tls_connect = tls . connect ;
114
108
beforeEach ( function ( ) {
115
109
tls . connect = function ( options ) {
116
110
options = utils . clone ( options ) ;
117
111
options . ca = tls_options . ca ;
112
+ options . servername = 'redis.js.org' ;
113
+ options . rejectUnauthorized = true ;
118
114
return tls_connect . call ( tls , options ) ;
119
115
} ;
120
116
} ) ;
0 commit comments