()
| 143 | }); |
| 144 | |
| 145 | function seedLastUpdate() { |
| 146 | _resetLastUpdateStateForTesting(); |
| 147 | _persistLastUpdateStateForTesting({ |
| 148 | to_version: '1.88.0', |
| 149 | from_version: '1.87.0', |
| 150 | status: 'success', |
| 151 | finished_at: Date.now(), |
| 152 | directive_id: 'd-test-123', |
| 153 | }); |
| 154 | const p = _getLastUpdateStatePathForTesting(); |
| 155 | assert.ok(fs.existsSync(p), 'precondition: state file present'); |
| 156 | return p; |
| 157 | } |
| 158 | |
| 159 | test('lifecycle heartbeat: 200 with {ok:false} envelope keeps the last_update state file', async () => { |
| 160 | const originalFetch = global.fetch; |
no outgoing calls
no test coverage detected