fix: docsgpt up review follow-ups

- wait_healthy starts no request once the deadline is reached, and neither
  its pauses nor the requests after the first run past it; the first attempt
  still always runs (status uses a zero timeout).
- envfile writes $ as $$ inside double quotes, which Compose interpolates,
  and reads $$ back as $, so a value such as pa$w'rd reaches the container
  unchanged.
- Upgrading no longer describes the working directory as the data home.
This commit is contained in:
Alex committed 2026-09-15 23:32:37 +01:00
1 parent 5e699b0168
commit f6bf4fefd1
5 files changed
+64 -10

No files matched your search

+10 -1
View File
@@ -55,12 +55,21 @@ class TestUpdate:
envfile.update(path, {"A": "3"})
assert path.read_text() == "A=3\nX=y\n"
@pytest.mark.parametrize("value", ["plain", "with space", "hash # inside", "it's", 'say "hi"', "back\\slash", ""])
@pytest.mark.parametrize(
"value",
["plain", "with space", "hash # inside", "it's", 'say "hi"', "back\\slash", "", "pa$w'rd", "a$$b'c", "$HOME"],
)
def test_values_round_trip(self, tmp_path, value):
path = tmp_path / ".env"
envfile.update(path, {"VALUE": value})
assert envfile.read(path)["VALUE"] == value
def test_a_dollar_in_double_quotes_is_escaped_for_compose(self, tmp_path):
"""Compose interpolates double-quoted .env values; $$ is its literal dollar."""
path = tmp_path / ".env"
envfile.update(path, {"API_KEY": "pa$w'rd"})
assert path.read_text() == "API_KEY=\"pa$$w'rd\"\n"
@pytest.mark.skipif(sys.platform == "win32", reason="POSIX permissions")
def test_a_new_file_is_private(self, tmp_path):
path = tmp_path / "stack" / ".env"