Kill the last surviving mutants of the sandbox and settings of the e2e command

This commit is contained in:
2026-11-19 04:04:13 +01:00
parent b709e03023
commit 7a798a9e37
2 changed files with 12 additions and 4 deletions
+4 -4
View File
@@ -31,15 +31,15 @@ def read(env: typing.Mapping[str, str]) -> Sandbox | Failure:
values = {name: env.get(name, "").strip() for name in MEANING}
url, project = values[JIRA_URL], values[PROJECT]
env_file = pathlib.Path(values[ENV_FILE]) if values[ENV_FILE] else None
absolute = env_file is not None and env_file.is_absolute()
usable = env_file if env_file is not None and env_file.is_absolute() else None
faults = [
*(f"{name} is missing: set it to {meaning}" for name, meaning in MEANING.items() if not values[name]),
*([f"{JIRA_URL} is {url!r}, not an https address without a path"] if url and not re.fullmatch(SITE, url) else []),
*([f"{PROJECT} is {project!r}, not a project key such as SBX"] if project and not re.fullmatch(PROJECT_KEY, project) else []),
*([f"{ENV_FILE} is {values[ENV_FILE]!r}, not an absolute path"] if env_file is not None and not absolute else []),
*([f"{ENV_FILE} is {values[ENV_FILE]!r}, not an absolute path"] if env_file is not None and usable is None else []),
]
if env_file is not None and absolute:
login = basic_auth(env_file)
if usable is not None:
login = basic_auth(usable)
if isinstance(login, Failure):
faults.append(login.reason)
if faults: