mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-08-24 00:11:55 +00:00
TESTS: replace old test suite with the new one
get rid of Bats definitively
This commit is contained in:
12
test/test_ssl/test_nohttps.py
Normal file
12
test/test_ssl/test_nohttps.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import pytest
|
||||
from requests import ConnectionError
|
||||
|
||||
def test_http_is_forwarded(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://web.nginx-proxy.tld/port", allow_redirects=False)
|
||||
assert r.status_code == 200
|
||||
assert "answer from port 83\n" in r.text
|
||||
|
||||
|
||||
def test_https_is_disabled(docker_compose, nginxproxy):
|
||||
with pytest.raises(ConnectionError):
|
||||
nginxproxy.get("https://web.nginx-proxy.tld/", allow_redirects=False)
|
Reference in New Issue
Block a user