Skip to content

Reapply "Add NoCompression option to tarball compressor"#129

Merged
rkoster merged 1 commit intocloudfoundry:developfrom
mdzhigarov:master
Nov 6, 2025
Merged

Reapply "Add NoCompression option to tarball compressor"#129
rkoster merged 1 commit intocloudfoundry:developfrom
mdzhigarov:master

Conversation

@mdzhigarov
Copy link
Contributor

This PR adds a new method IsNonCompressedTarball to the Compressor interface to detect whether a file is a non-compressed tarball.

Changes

  • Added IsNonCompressedTarball(path string) (bool, error) method to the Compressor interface
  • Implemented the method in tarballCompressor using the native golang approach to inspect the tar contents
  • Implemented the method in FakeCompressor returning false for testing purposes
  • Added comprehensive unit tests covering:
    • Positive case: non-compressed tarball files
    • Negative cases: compressed tarballs and non-tarball files
    • Error handling: file command failures and execution errors

Testing

All existing tests pass and new unit tests provide comprehensive coverage of the new functionality.

@mdzhigarov mdzhigarov changed the base branch from master to develop November 6, 2025 16:21
@rkoster rkoster merged commit 659b600 into cloudfoundry:develop Nov 6, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants