MCPcopy Create free account
hub / github.com/apache/httpd / _class_scope

Method _class_scope

test/modules/proxy/test_01_http.py:12–39  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

10
11 @pytest.fixture(autouse=True, scope='class')
12 def _class_scope(self, env):
13 # setup 3 vhosts on https: for reverse, forward and mixed proxying
14 # setup 3 vhosts on http: with different document roots
15 conf = HttpdConf(env)
16 conf.add("ProxyPreserveHost on")
17 conf.start_vhost(domains=[env.d_reverse], port=env.https_port)
18 conf.add([
19 f"ProxyPass / http://127.0.0.1:{env.http_port}/"
20 ])
21 conf.end_vhost()
22 conf.add_vhost(domains=[env.d_reverse], port=env.http_port, doc_root='htdocs/test1')
23
24 conf.start_vhost(domains=[env.d_forward], port=env.https_port)
25 conf.add([
26 "ProxyRequests on"
27 ])
28 conf.end_vhost()
29 conf.add_vhost(domains=[env.d_forward], port=env.http_port, doc_root='htdocs/test2')
30
31 conf.start_vhost(domains=[env.d_mixed], port=env.https_port)
32 conf.add([
33 f"ProxyPass / http://127.0.0.1:{env.http_port}/",
34 "ProxyRequests on"
35 ])
36 conf.end_vhost()
37 conf.add_vhost(domains=[env.d_mixed], port=env.http_port, doc_root='htdocs')
38 conf.install()
39 assert env.apache_restart() == 0
40
41 @pytest.mark.parametrize(["via", "seen"], [
42 ["reverse", "test1"],

Callers

nothing calls this directly

Calls 7

addMethod · 0.95
start_vhostMethod · 0.95
end_vhostMethod · 0.95
add_vhostMethod · 0.95
installMethod · 0.95
HttpdConfClass · 0.90
apache_restartMethod · 0.80

Tested by

no test coverage detected