File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,19 @@ Connection: close
100
100
101
101
// Regression at https://github.com/denoland/deno/issues/27652
102
102
Deno . test ( "tls.connect makes tls connection to example.com" , async ( ) => {
103
- const socket = tls . connect ( 443 , "example.com" ) ;
103
+ const socket = tls . connect ( {
104
+ port : 4557 ,
105
+ host : "localhost" ,
106
+ // deno-lint-ignore no-explicit-any
107
+ secureContext : { ca : rootCaCert } as any ,
108
+ } ) ;
104
109
await new Promise ( ( resolve ) => {
105
110
socket . on ( "secureConnect" , resolve ) ;
106
111
} ) ;
107
112
socket . write (
108
- "GET / HTTP/1.1\r\nHost: example.com \r\nConnection: close\r\n\r\n" ,
113
+ "GET / HTTP/1.1\r\nHost: localhost \r\nConnection: close\r\n\r\n" ,
109
114
) ;
110
- assertStringIncludes ( await text ( socket ) , "<title>Example Domain</title> " ) ;
115
+ assertStringIncludes ( await text ( socket ) , "PASS " ) ;
111
116
} ) ;
112
117
113
118
// https://github.com/denoland/deno/pull/20120
You can’t perform that action at this time.
0 commit comments