static and media url fix 4
This commit is contained in:
1 parent
d9cf68ba7c
commit
049cc41afc
4 files changed
+25
-2
No files matched your search
@@ -36,12 +36,21 @@ def test_bale_missing_token_is_not_silently_successful(settings):
|
||||
def test_nginx_serves_assets_without_proxying_django():
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
nginx = (root / "docker" / "nginx.conf").read_text(encoding="utf-8")
|
||||
nginx_dockerfile = (root / "Dockerfile.nginx").read_text(encoding="utf-8")
|
||||
compose = (root / "docker-compose.yml").read_text(encoding="utf-8")
|
||||
assert "location /static/" in nginx
|
||||
assert "location ^~ /media/branding/" in nginx
|
||||
assert "location /protected-media/" in nginx
|
||||
assert "location = /healthz/" in nginx
|
||||
assert "return 200" in nginx
|
||||
assert "secure_link_md5" in nginx
|
||||
assert "proxy_pass" not in nginx
|
||||
assert "dockerfile: Dockerfile.nginx" in compose
|
||||
assert "./docker/nginx.conf:" not in compose
|
||||
assert (
|
||||
"COPY docker/nginx.conf /etc/nginx/templates/default.conf.template"
|
||||
in nginx_dockerfile
|
||||
)
|
||||
assert "media_data:/app/media:ro" in compose
|
||||
assert "notification-worker:" in compose
|
||||
assert " db:" not in compose
|
||||
|
||||
Reference in new issue
Block a user