summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/test_variables.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_variables.py b/test/test_variables.py
index a4c5446d..7322a802 100644
--- a/test/test_variables.py
+++ b/test/test_variables.py
@@ -1,3 +1,5 @@
+import os
+from pathlib import Path
import re
import time
@@ -122,6 +124,27 @@ def test_variables_uri(search_in_file, wait_for_record):
check_uri('/9?q#a', '/9')
+def test_variables_uri_no_cache(temp_dir):
+ os.makedirs(f'{temp_dir}/foo/bar')
+ Path(f'{temp_dir}/foo/bar/index.html').write_text('index')
+
+ assert 'success' in client.conf(
+ {
+ "listeners": {"*:7080": {"pass": "routes"}},
+ "routes": [
+ {
+ "action": {
+ "rewrite": "/foo${uri}/",
+ "share": f'{temp_dir}$uri',
+ }
+ }
+ ],
+ }
+ )
+
+ assert client.get(url='/bar')['status'] == 200
+
+
def test_variables_host(search_in_file, wait_for_record):
set_format('$host')