Releases: go-pkgz/testutils
Releases · go-pkgz/testutils
Version 0.4.0
What's New
- Added DeleteFile method to FTP container
- Added full file operations (upload, download, list, delete) to SSH container
- Added full file operations (upload, download, list, delete) to Localstack/S3 container
- All file operations handle nested directories automatically
- Consistent API across all container types for file operations
- Updated README with examples for all new methods
Details
File Operations
All three container types (FTP, SSH, and Localstack/S3) now support:
- SaveFile: Upload files to the container
- GetFile: Download files from the container
- ListFiles: List files in a directory
- DeleteFile: Remove files from the container
Directory paths are handled automatically - you can save files to nested paths without having to create the directories first.
Version 0.3.0
What's Changed
- Add FTP Server Test Container by @umputun in #2
- Migrate to golangci-lint v2 and fix linting issues by @umputun in #3
Full Changelog: v0.2.1...v0.3.0
v0.2.1
Improvements
- Improved test coverage to over 90% for the main package
- Improved test coverage to over 96% for the containers package
- Added comprehensive tests for all utilities
- Fixed edge case handling in HTTP request utilities
This release maintains backward compatibility while significantly improving test coverage.
v0.2.0
New Features
File Utilities
- Add
WriteTestFile: Creates temporary test files with automatic cleanup after test completion
HTTP Test Utilities
- Add
MockHTTPServer: Creates HTTP test servers with automatic cleanup - Add
HTTPRequestCaptor: Captures and records HTTP requests for inspection in tests
Improvements
- Update README with comprehensive examples for all utilities
- Refactor tests to use testify/require for more consistent assertions
- Add automated cleanup with t.Cleanup for all testing resources
All new utilities follow the same pattern as existing code with proper resource management and thorough test coverage.
Version 0.1.0
initial release