diff options
author | Rob Crittenden <rcritten@redhat.com> | 2016-01-18 10:44:21 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2016-01-19 14:32:26 -0500 |
commit | 5f739e1e7565f1291fae8c2dc46d279db202accd (patch) | |
tree | a9af3e4ca4bf31d77cafdf3184d2531b55003c37 | |
parent | 9bcb9cef16895061d9de48b25b85c66f0ab17223 (diff) | |
download | mod_nss-5f739e1e7565f1291fae8c2dc46d279db202accd.tar.gz mod_nss-5f739e1e7565f1291fae8c2dc46d279db202accd.tar.xz mod_nss-5f739e1e7565f1291fae8c2dc46d279db202accd.zip |
Add basic reverse proxy test case (over Internet)
Fetches https://www.google.com and just looks for a 200 response.
This adds implicit requirement that the test machine has Internet
access so I might have to remove this eventually, but it at
least exercises that code in a positive test case.
-rwxr-xr-x | test/createinstance.sh | 10 | ||||
-rw-r--r-- | test/suite1.tmpl | 3 | ||||
-rw-r--r-- | test/test.py | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/createinstance.sh b/test/createinstance.sh index cc76671..e32c628 100755 --- a/test/createinstance.sh +++ b/test/createinstance.sh @@ -53,6 +53,16 @@ mkdir run mkdir cgi-bin mkdir lib +if [ -e /usr/lib64/libnssckbi.so ]; then + cd alias + ln -s /usr/lib64/libnssckbi.so . + cd .. +elif [ -e /usr/lib/libnssckbi.so ]; then + cd alias + ln -s /usr/lib/libnssckbi.so . + cd .. +fi + touch conf.d/empty.conf # Create the content directories diff --git a/test/suite1.tmpl b/test/suite1.tmpl index 827e478..38ea2b0 100644 --- a/test/suite1.tmpl +++ b/test/suite1.tmpl @@ -110,6 +110,9 @@ CoreDumpDirectory $SERVER_ROOT ProxyPass /proxy https://www1.example.com:8000/proxydata ProxyPassReverse /proxy https://www1.example.com:8000/proxydata + ProxyPass /google https://www.google.com/ + ProxyPassReverse /google https://www.google.com/ + </VirtualHost> # diff --git a/test/test.py b/test/test.py index 90b969d..fadc5d0 100644 --- a/test/test.py +++ b/test/test.py @@ -271,6 +271,12 @@ class test_suite1(Declarative): ), dict( + desc='Basic reverse proxy request', + request=('/google/', {}), + expected=200, + ), + + dict( desc='SNI request when SNI is disabled', request=('/index.html', {'host': 'www1.example.com', 'port': 8000} |