Commit 892db1c
committed
fix(gastown): fix eviction test assertions and replace as casts with Zod validation
- Replace incorrect test that asserted touchAgentHeartbeat() clears drain
flag (it doesn't) with tests for acknowledgeContainerReady() which is
the actual mechanism that clears drain state
- Add test for nonce mismatch case (wrong nonce keeps draining=true)
- Add test verifying touchAgentHeartbeat returns drainNonce but doesn't
clear draining flag, and only acknowledgeContainerReady clears it
- Replace manual 'as' casts in handleContainerReady with Zod schema
validation per project conventions1 parent ea7b576 commit 892db1c
File tree
2 files changed
+45
-21
lines changed- cloudflare-gastown
- src/handlers
- test/integration
2 files changed
+45
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 129 | + | |
142 | 130 | | |
143 | | - | |
| 131 | + | |
| 132 | + | |
144 | 133 | | |
145 | 134 | | |
| 135 | + | |
146 | 136 | | |
147 | 137 | | |
148 | 138 | | |
| |||
Lines changed: 40 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
141 | 169 | | |
142 | 170 | | |
143 | 171 | | |
144 | 172 | | |
145 | 173 | | |
146 | 174 | | |
147 | | - | |
148 | | - | |
| 175 | + | |
| 176 | + | |
149 | 177 | | |
150 | 178 | | |
151 | 179 | | |
152 | | - | |
| 180 | + | |
153 | 181 | | |
154 | 182 | | |
155 | | - | |
156 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
157 | 191 | | |
158 | 192 | | |
159 | 193 | | |
| |||
0 commit comments