Add basic tests for the test caching functionality#20
Conversation
Codecov Report
@@ Coverage Diff @@
## main #20 +/- ##
=========================================
+ Coverage 6.98% 12.13% +5.15%
=========================================
Files 4 4
Lines 859 865 +6
=========================================
+ Hits 60 105 +45
+ Misses 792 741 -51
- Partials 7 19 +12
Continue to review full report at Codecov.
|
| chunks map[string]*ociv1.Manifest | ||
| } | ||
|
|
||
| type removeOpts struct { |
There was a problem hiding this comment.
| type removeOpts struct { | |
| type removeBaseLayerOpts struct { |
| ) | ||
|
|
||
| // Registry provides container registry services | ||
| type Registry interface { |
There was a problem hiding this comment.
Nice one. We could consider (in a next step after this PR) to mock this interface proper, and make removeBaseLayer use this interface, too.
There was a problem hiding this comment.
next step
+1
mock this interface proper
mock or fake?
make removeBaseLayer use this interface
I was going to look at expanding the testing and it would make sense to take a look at doing it then.
Also some minor tidy up.
Note that there is some odd behaviour with main (& this branch) atm.
If you run ./example.sh multiple times it is repeating tests incrementally down to 0. Possibly timestamp related, but I'll take a look post-dinner (or tomorrow)
I'll also look at expanding the cache test functionality i.e. changing a test should trigger a re-test, etc.