Skip to content

Commit fd189ac

Browse files
committed
fix(common): update unit test for release
1 parent 78af81c commit fd189ac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/unit/release_test.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ test_release_falls_back_to_app_py() {
175175
assert_contains "$output" 'web: python3 app.py' "release should use app.py when main.py is absent"
176176
}
177177

178-
test_release_uses_uvicorn_fallback_when_no_entrypoint_exists() {
178+
test_release_leaves_web_process_empty_when_no_entrypoint_exists() {
179179
# Arrange
180-
local app_dir="$TEST_ROOT/uvicorn-fallback-app"
180+
local app_dir="$TEST_ROOT/no-entrypoint-app"
181181
mkdir -p "$app_dir"
182182
setup_fake_python_commands
183183

@@ -186,14 +186,16 @@ test_release_uses_uvicorn_fallback_when_no_entrypoint_exists() {
186186

187187
# Assert
188188
assert_exit_code "$status" 0 "release should still succeed when no explicit entrypoint exists"
189-
assert_contains "$output" 'web: python3 -m uvicorn main:app --host 0.0.0.0 --port ${PORT:-8000}' "release should emit the uvicorn fallback command"
189+
assert_contains "$output" 'default_process_types:' "release should still emit release metadata"
190+
assert_contains "$output" ' web: ' "release should leave the web process empty when no entrypoint exists"
191+
assert_not_contains "$output" 'uvicorn' "release should not emit the removed uvicorn fallback"
190192
}
191193

192194
test_release_exits_when_procfile_exists
193195
test_release_prefers_project_name_script_over_start
194196
test_release_falls_back_to_start_script
195197
test_release_falls_back_to_main_py
196198
test_release_falls_back_to_app_py
197-
test_release_uses_uvicorn_fallback_when_no_entrypoint_exists
199+
test_release_leaves_web_process_empty_when_no_entrypoint_exists
198200

199201
echo "PASS: release unit tests"

0 commit comments

Comments
 (0)