Create unit tests for pkg/tar-patch package

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
testing

Research direction

Read the roughly 175-line pkg/tar-patch package, then create pkg/tar-patch/apply_test.go covering Apply(), FilesystemDataSource, error cases, and the listed filesystem edge cases. Run the package tests and verify that all tests pass with at least 80% coverage for pkg/tar-patch; confirm the work is compatible with the modern Go version required by dependency #22.

Written by the indexing model from the issue text.

Description

The pkg/tar-patch package (~175 lines) handles patch application but has no unit tests.

Test File to Create

  • pkg/tar-patch/apply_test.go

Test Coverage

  • Apply() function with various delta operations
  • FilesystemDataSource implementation
  • Error handling (missing files, corrupted deltas)
  • Edge cases (symlinks, hardlinks, sparse files)

Acceptance Criteria

  • All tests passing
  • Code coverage >= 80% for pkg/tar-patch

Dependencies

  • Depends on #22 (Go 1.25+ update) - tests should target modern Go version
Dominant language
Go
Stars
66
Forks
27
Avg merge
14d 3h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containers/tar-diff

All issues in containers/tar-diff

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.