@@ -51,6 +51,24 @@ test('only http, port 0', function (t) {
51
51
} ) ;
52
52
} ) ;
53
53
54
+ test ( 'only http, timeout' , function ( t ) {
55
+ t . plan ( 5 ) ;
56
+ var time = 3000000 ;
57
+ createServers ( {
58
+ log : console . log ,
59
+ timeout : time ,
60
+ http : 0 ,
61
+ handler : fend
62
+ } , function ( err , servers ) {
63
+ console . dir ( err ) ;
64
+ t . error ( err ) ;
65
+ t . equals ( typeof servers , 'object' ) ;
66
+ t . equals ( typeof servers . http , 'object' ) ;
67
+ t . equals ( typeof servers . http . address ( ) . port , 'number' ) ;
68
+ t . equals ( servers . http . timeout , time ) ;
69
+ servers . http . close ( ) ;
70
+ } ) ;
71
+ } ) ;
54
72
55
73
test ( 'only https' , function ( t ) {
56
74
t . plan ( 3 ) ;
@@ -71,6 +89,28 @@ test('only https', function (t) {
71
89
} ) ;
72
90
} ) ;
73
91
92
+ test ( 'only https' , function ( t ) {
93
+ t . plan ( 4 ) ;
94
+ var time = 4000000 ;
95
+ createServers ( {
96
+ log : console . log ,
97
+ https : {
98
+ timeout : time ,
99
+ port : 3456 ,
100
+ root : path . join ( __dirname , 'fixtures' ) ,
101
+ cert : 'agent2-cert.pem' ,
102
+ key : 'agent2-key.pem'
103
+ } ,
104
+ handler : fend
105
+ } , function ( err , servers ) {
106
+ t . error ( err ) ;
107
+ t . equals ( typeof servers , 'object' ) ;
108
+ t . equals ( typeof servers . https , 'object' ) ;
109
+ t . equals ( servers . https . timeout , time ) ;
110
+ servers . https . close ( ) ;
111
+ } ) ;
112
+ } ) ;
113
+
74
114
test ( 'absolute cert path resolution' , function ( t ) {
75
115
t . plan ( 3 ) ;
76
116
createServers ( {
0 commit comments