Skip to content

Commit f6dfa05

Browse files
committed
✅ Update test to expect .env exclusion
1 parent ce09070 commit f6dfa05

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_archive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,13 @@ def test_archive_respects_fastapicloudignore_unignore(
143143
}
144144

145145

146-
def test_archive_includes_hidden_files(
146+
def test_archive_includes_hidden_files_but_excludes_env(
147147
src_path: Path, tar_path: Path, dst_path: Path
148148
) -> None:
149-
"""Should include hidden files in the archive by default."""
149+
"""Should include hidden files but exclude .env files."""
150150
(src_path / "main.py").write_text("print('hello')")
151151
(src_path / ".env").write_text("SECRET_KEY=xyz")
152+
(src_path / ".env.local").write_text("LOCAL_KEY=abc")
152153
(src_path / ".config").mkdir()
153154
(src_path / ".config" / "settings.json").write_text('{"setting": "value"}')
154155

@@ -159,7 +160,6 @@ def test_archive_includes_hidden_files(
159160

160161
assert set(dst_path.glob("**/*")) == {
161162
dst_path / "main.py",
162-
dst_path / ".env",
163163
dst_path / ".config",
164164
dst_path / ".config" / "settings.json",
165165
}

0 commit comments

Comments
 (0)