Commit 9c7777f
Fix Mockoon port conflict in CI registrar tests
The CI job for mockoon-registrar-tests was failing because both the GitHub
Actions mockoon/cli-action and the test script were trying to start Mockoon
on port 3001, causing a "Port 3001 is already in use" error.
Changes:
- Enhanced port detection logic in tests/mockoon_registrar_tests.sh to use
multiple methods (lsof, netstat, ss, and curl) for detecting if port 3001
is already in use
- Improved cleanup logic to properly terminate Mockoon processes using
multiple methods (kill by PID, lsof, pkill by process name)
- Made the script more robust in CI environments where lsof might not
be available or behave differently
The test script now properly detects when Mockoon is already running
(started by the GitHub Actions workflow) and skips starting a duplicate
instance, avoiding the port conflict.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent f15df20 commit 9c7777f
1 file changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| |||
84 | 96 | | |
85 | 97 | | |
86 | 98 | | |
| 99 | + | |
87 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
88 | 109 | | |
89 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
90 | 114 | | |
91 | 115 | | |
92 | 116 | | |
| |||
0 commit comments