furiko-io / furiko

Kubernetes cron and batch job platform
https://furiko.io
Apache License 2.0
484 stars 21 forks source link

test(cron): Add unit tests for CronWorker #39

Closed irvinlim closed 2 years ago

irvinlim commented 2 years ago

Adds unit tests for CronWorker.

codecov[bot] commented 2 years ago

Codecov Report

Merging #39 (f7d0ae1) into main (7b79cd4) will increase coverage by 2.16%. The diff coverage is 65.57%.

@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   49.73%   51.89%   +2.16%     
==========================================
  Files         161      162       +1     
  Lines        7991     8024      +33     
==========================================
+ Hits         3974     4164     +190     
+ Misses       3834     3664     -170     
- Partials      183      196      +13     
Impacted Files Coverage Δ
...execution/controllers/croncontroller/controller.go 23.68% <0.00%> (-0.65%) :arrow_down:
...xecution/controllers/croncontroller/cron_worker.go 71.24% <58.82%> (ø)
pkg/utils/testutils/klog.go 60.00% <60.00%> (ø)
...g/execution/controllers/croncontroller/informer.go 71.15% <100.00%> (+71.15%) :arrow_up:
pkg/execution/controllers/croncontroller/ticker.go 100.00% <100.00%> (ø)
.../runtime/controllercontext/mock/context_configs.go 81.39% <100.00%> (+1.90%) :arrow_up:
pkg/execution/controllers/croncontroller/util.go 90.90% <0.00%> (+9.09%) :arrow_up:
...ed/typed/execution/v1alpha1/fake/fake_jobconfig.go 42.25% <0.00%> (+14.08%) :arrow_up:
pkg/utils/eventhandler/executionv1alpha1.go 40.00% <0.00%> (+20.00%) :arrow_up:
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7b79cd4...f7d0ae1. Read the comment docs.