(self, env)
| 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"], |
nothing calls this directly
no test coverage detected