File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
nixos/tests/web-servers/h2o Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 110110 } ;
111111 } ;
112112 } ;
113-
114113 testScript =
115114 let
116115 portStrHTTP = builtins . toString port . HTTP ;
122121 server.wait_for_open_port(${ portStrHTTP } )
123122 server.wait_for_open_port(${ portStrTLS } )
124123
125- http_hello_world_body = server.succeed("curl --fail-with-body 'http://${ domain . HTTP } :${ portStrHTTP } /hello_world.txt'")
126- assert "${ sawatdi_chao_lok } " in http_hello_world_body
124+ assert "${ sawatdi_chao_lok } " in server.succeed("curl --fail-with-body 'http://${ domain . HTTP } :${ portStrHTTP } /hello_world.txt'")
127125
128126 tls_hello_world_head = server.succeed("curl -v --head --compressed --http2 --tlsv1.3 --fail-with-body 'https://${ domain . TLS } :${ portStrTLS } /hello_world.rst'").lower()
129127 assert "http/2 200" in tls_hello_world_head
130128 assert "server: h2o" in tls_hello_world_head
131129 assert "content-type: text/x-rst" in tls_hello_world_head
132130
133- tls_hello_world_body = server.succeed("curl -v --http2 --tlsv1.3 --compressed --fail-with-body 'https://${ domain . TLS } :${ portStrTLS } /hello_world.rst'")
134- assert "${ sawatdi_chao_lok } " in tls_hello_world_body
131+ assert "${ sawatdi_chao_lok } " in server.succeed("curl -v --http2 --tlsv1.3 --compressed --fail-with-body 'https://${ domain . TLS } :${ portStrTLS } /hello_world.rst'")
135132
136- tls_hello_world_head_redirected = server.succeed("curl -v --head --fail-with-body 'http://${ domain . TLS } :${ builtins . toString port . HTTP } /hello_world.rst'").lower()
137- assert "redirected" in tls_hello_world_head_redirected
133+ assert "redirected" in server.succeed("curl -v --head --fail-with-body 'http://${ domain . TLS } :${ portStrHTTP } /hello_world.rst'").lower()
138134
139135 server.fail("curl --location --max-redirs 0 'http://${ domain . TLS } :${ portStrHTTP } /hello_world.rst'")
140136
141- tls_hello_world_body_redirected = server.succeed("curl -v --location --fail-with-body 'http://${ domain . TLS } :${ portStrHTTP } /hello_world.rst'")
142- assert "${ sawatdi_chao_lok } " in tls_hello_world_body_redirected
137+ assert "${ sawatdi_chao_lok } " in server.succeed("curl -v --location --fail-with-body 'http://${ domain . TLS } :${ portStrHTTP } /hello_world.rst'")
143138 '' ;
144139}
Original file line number Diff line number Diff line change 5858 server.wait_for_unit("h2o.service")
5959 server.wait_for_open_port(${ portStr } )
6060
61- hello_world = server.succeed("curl --fail-with-body http://${ domain } :${ portStr } /hello_world")
62- assert "${ sawatdi_chao_lok } " in hello_world
61+ assert "${ sawatdi_chao_lok } " in server.succeed("curl --fail-with-body http://${ domain } :${ portStr } /hello_world")
6362
64- file_handler = server.succeed("curl --fail-with-body http://${ domain } :${ portStr } /file_handler")
65- assert "FILE_HANDLER" in file_handler
63+ assert "FILE_HANDLER" in server.succeed("curl --fail-with-body http://${ domain } :${ portStr } /file_handler")
6664 '' ;
6765}
You can’t perform that action at this time.
0 commit comments