Commit 093335b
authored
Reject watch resume main (kptdev#1104)
* Reject watch resume calls
Signed-off-by: Gergely Nagy <gergely.l.nagy@ericsson.com>
* Add WatchList feature flag
Signed-off-by: Gergely Nagy <gergely.l.nagy@ericsson.com>
* Fix watch tests: remove goto statements and correct error assertions
- Remove all goto statements from watch_test.go and e2e/api/watch_test.go,
replacing them with helper functions for better readability.
- Fix test assertions to use IsResourceExpired instead of IsGone, matching
the implementation which uses NewResourceExpired (standard k8s pattern
for stale resourceVersion).
- Fix StatusReasonExpired assertion (was incorrectly expecting StatusReasonGone).
- Extract hasExactResourceVersion variable for clarity in createGenericWatch.
- Add cancel() call before returning 410 to avoid context leak.
Signed-off-by: Gergely Nagy <gergely.l.nagy@ericsson.com>
* Fix empty line
Signed-off-by: Gergely Nagy <gergely.l.nagy@ericsson.com>
---------
Signed-off-by: Gergely Nagy <gergely.l.nagy@ericsson.com>1 parent e9755d8 commit 093335b
3 files changed
Lines changed: 630 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| |||
0 commit comments