feat: add static file serving with ETag caching

This commit is contained in:
2026-07-16 10:29:59 +03:00
parent e37545ffff
commit dde18673df
6 changed files with 202 additions and 5 deletions
+4 -1
View File
@@ -23,10 +23,11 @@ def get_free_port():
class PipelineServer:
"""Manages a pipeline-runner server instance for tests."""
def __init__(self, port, work_dir, verbose=False):
def __init__(self, port, work_dir, verbose=False, web_root=None):
self.port = port
self.work_dir = work_dir
self.verbose = verbose
self.web_root = web_root
test_dir = os.path.dirname(os.path.abspath(__file__))
project_root = os.path.dirname(test_dir)
@@ -37,6 +38,8 @@ class PipelineServer:
"pipelines_dir": os.path.join(work_dir, "pipelines") + "/",
"logs_dir": os.path.join(work_dir, "logs") + "/",
}
if web_root:
config["web_root"] = web_root
self.config_path = os.path.join(work_dir, "pipeline-runner.conf")
with open(self.config_path, "w") as f:
json.dump(config, f)