Commit 25095e3
committed
test(cli): stop the telemetry report tests passing vacuously
Version is "dev" in a test binary, and a dev build has telemetry switched off
entirely, so reportCommand returned at its first line in both tests that
exercise it. They asserted that no child process was started, which was true
for a reason that had nothing to do with the code under test: they would have
passed just as well with the opt-out gate and the unresolved-command filter
both deleted.
The tests now make the binary look like a released one for their duration. A
positive case comes with them, asserting that a resolved command with telemetry
on really does start a child, so that a reportCommand which returned early for
every input can no longer satisfy the pair.
Verified by mutation: removing either the opt-out gate or the empty-command
filter now fails the corresponding test, where before it did not.
Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Chainloop-Trace-Sessions: 2dd3f4ba-458a-4d2b-8f0b-eb8f7804f4d01 parent 448b608 commit 25095e3
1 file changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
76 | 88 | | |
77 | 89 | | |
78 | 90 | | |
| |||
173 | 185 | | |
174 | 186 | | |
175 | 187 | | |
| 188 | + | |
176 | 189 | | |
177 | 190 | | |
178 | 191 | | |
| |||
187 | 200 | | |
188 | 201 | | |
189 | 202 | | |
| 203 | + | |
190 | 204 | | |
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
194 | 208 | | |
195 | 209 | | |
196 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
0 commit comments