- Notifications
You must be signed in to change notification settings - Fork1k
Commita9f607a
authored
test: add an ergonomic way to access the test database for debugging (#19371)
Accessing the database during debugging currently requires eitherspinning up a separate PostgreSQL instance or inspecting memory toretrieve the DSN—both of which add unnecessary friction. While the testsuite already provisions a database by default, connecting to it formanual inspection or debugging is not straightforward.This change introduces a clearer and more accessible way to surface theDSN during debugging sessions, allowing developers to connect to thetest database directly without relying on external infrastructure or adhoc methods.Expected Usage:1. Debug using dlv or the IDE.2. Step through line by line and determine that a query isn't doing whatyou'd expect3. No further insight to be gained at the Go level4. The next place to test is to connect directly to the database whileit is in the exact state that the test has produced just before runningthe query5. Rerun the test with this option enabled and your breakpoint set rightbefore the questionable query runs6. Connect to the database and inspect or troubleshoot as you need to1 parentd7bdb3c commita9f607a
2 files changed
+19
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
| 141 | + | |
141 | 142 |
| |
142 | 143 |
| |
143 | 144 |
| |
| |||
150 | 151 |
| |
151 | 152 |
| |
152 | 153 |
| |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
153 | 162 |
| |
154 | 163 |
| |
155 | 164 |
| |
| 165 | + | |
156 | 166 |
| |
157 | 167 |
| |
158 | 168 |
| |
| |||
227 | 237 |
| |
228 | 238 |
| |
229 | 239 |
| |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
230 | 245 |
| |
231 | 246 |
| |
232 | 247 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 |
| |
23 | 27 |
| |
24 | 28 |
| |
|
0 commit comments
Comments
(0)