Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve gzip_zinfo unittest coverage #290

Open
5 tasks
djdongjin opened this issue Jan 6, 2023 · 1 comment
Open
5 tasks

Improve gzip_zinfo unittest coverage #290

djdongjin opened this issue Jan 6, 2023 · 1 comment
Labels
feature New feature or request stability Decreases the likelihood for introducing bugs

Comments

@djdongjin
Copy link
Contributor

djdongjin commented Jan 6, 2023

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.

  • NewGzipZinfo: no positive testcases (can create GzipZinfo with valid data)
  • NewGzipZinfoFromFile: no test.
  • TestExtractDataFromBuffer: no positive testcases (can extract correct data from gzipzinfo)
  • TestExtractData: same as above.
  • remaining funcs: no test.

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

Describe the solution you'd like

Improve test coverage.

@djdongjin djdongjin added feature New feature or request stability Decreases the likelihood for introducing bugs labels Jan 6, 2023
@github-project-automation github-project-automation bot moved this to ❓ Ungroomed in soci-snapshotter Jan 6, 2023
@Kern-- Kern-- moved this from ❓ Ungroomed to 📋 Backlog in soci-snapshotter Jan 6, 2023
@hanyuel hanyuel self-assigned this Jan 17, 2023
@hanyuel
Copy link
Contributor

hanyuel commented Jan 20, 2023

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.

@hanyuel hanyuel removed their assignment Jan 20, 2023
@turan18 turan18 self-assigned this Feb 6, 2023
@turan18 turan18 removed their assignment Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request stability Decreases the likelihood for introducing bugs
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants