Skip to content

Commit 454411d

Browse files
committed
nixos/h2o: reduce variable name noise
1 parent f68ad5c commit 454411d

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

nixos/tests/web-servers/h2o/basic.nix

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ in
110110
};
111111
};
112112
};
113-
114113
testScript =
115114
let
116115
portStrHTTP = builtins.toString port.HTTP;
@@ -122,23 +121,19 @@ in
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
}

nixos/tests/web-servers/h2o/mruby.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ in
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
}

0 commit comments

Comments
 (0)