github.com/cilium/statedb@v0.3.2/reconciler/testdata/refresh.txtar (about) 1 hive start 2 start-reconciler with-refresh 3 4 # Step 1: Add a test object. 5 db insert test-objects obj1.yaml 6 expect-ops 'update(1)' 7 db cmp test-objects step1.table 8 9 # Step 2: Set the object as updated in the past to force refresh 10 db insert test-objects obj1_old.yaml 11 expect-ops 'update-refresh(1)' 12 13 # Step 3: Refresh with faulty target, should see fail & retries 14 set-faulty true 15 db insert test-objects obj1_old.yaml 16 expect-ops 'update-refresh(1) fail' 'update-refresh(1) fail' 17 db cmp test-objects step3.table 18 health 19 health 'job-reconcile.*Degraded' 20 21 # Step 4: Back to health 22 set-faulty false 23 db insert test-objects obj1_old.yaml 24 expect-ops 'update-refresh(1)' 25 db cmp test-objects step4.table 26 health 'job-reconcile.*OK, 1 object' 27 28 # ----- 29 -- step1.table -- 30 ID StatusKind 31 1 Done 32 33 -- step3.table -- 34 ID StatusKind 35 1 Error 36 37 -- step4.table -- 38 ID StatusKind 39 1 Done 40 41 -- obj1.yaml -- 42 id: 1 43 faulty: false 44 updates: 1 45 status: 46 kind: Pending 47 updatedat: 2024-01-01T10:10:10.0+02:00 48 error: "" 49 50 -- obj1_old.yaml -- 51 id: 1 52 faulty: false 53 updates: 1 54 status: 55 kind: Done 56 updatedat: 2000-01-01T10:10:10.0+02:00 57 error: "" 58