comparison tests/test-hgweb-csp.t @ 34483:a6d95a8b7243

serve: make tests compatible with chg chg only supports 'hg serve' when the options to the serve command follow the 'hg serve'. For example, 'hg -R <repo> serve ..' is unsupported. This leads to issues with chg running for the following tests: - test-bundle2-exchange.t - test-clone-uncompressed.t - test-hgweb-csp.t - test-http-bad-server.t - test-http-bundle1.t - test-http-protocol.t - test-http.t There was an effort made earlier to fix this issue for chg and the tests were fixed to confirm to the compatible pattern. But the new tests did not take care of the same and hence, fail. Hopefully, there will be continuous build setup for chg after all tests are made compatible with chg so that we can avoid such issues. Test Plan: Ran the aforementioned tests with and without '--chg' option. Differential Revision: https://phab.mercurial-scm.org/D946
author Saurabh Singh <singhsrb@fb.com>
date Wed, 04 Oct 2017 18:39:26 -0700
parents d7bf7d2bd5ab
children 45a816361926
comparison
equal deleted inserted replaced
34482:75de5d456b60 34483:a6d95a8b7243
108 108
109 hgweb_mod w/o hgwebdir works as expected 109 hgweb_mod w/o hgwebdir works as expected
110 110
111 $ killdaemons.py 111 $ killdaemons.py
112 112
113 $ hg -R repo1 serve -p $HGPORT -d --pid-file=hg.pid --config "web.csp=image-src 'self'; script-src https://example.com/ 'nonce-%nonce%'" 113 $ hg serve -R repo1 -p $HGPORT -d --pid-file=hg.pid --config "web.csp=image-src 'self'; script-src https://example.com/ 'nonce-%nonce%'"
114 $ cat hg.pid > $DAEMON_PIDS 114 $ cat hg.pid > $DAEMON_PIDS
115 115
116 static page sends CSP 116 static page sends CSP
117 117
118 $ get-with-headers.py --headeronly localhost:$HGPORT static/mercurial.js content-security-policy etag 118 $ get-with-headers.py --headeronly localhost:$HGPORT static/mercurial.js content-security-policy etag