awslabs / soci-snapshotter

A containerd snapshotter plugin which enables standard OCI images to be lazily loaded without requiring a build-time conversion step.
Apache License 2.0
517 stars 54 forks source link

Improve gzip_zinfo unittest coverage #290

Open djdongjin opened 1 year ago

djdongjin commented 1 year ago

Is your feature request related to a problem? Please describe.

gzip_zinfo doesn't have any unit test, #287 will adds some initial unit tests for it after merge but we should try to add the missing unit tests.

https://github.com/awslabs/soci-snapshotter/blob/main/compression/gzip_zinfo.go

Describe the solution you'd like

Improve test coverage.

hanyuel commented 1 year ago

The functions in gzip_zinfo.go are called solely in our ztoc/ code (specificallyztoc_builder.go and ztoc.go) which are already well covered by the tests inztoc_test.go. So I don't think adding more tests for gzip_zinfo.go would add much benefits. I think the priority for this ticket should be low.