Skip to content

test: add unit tests for curl wrapper#498

Merged
Soner (shyim) merged 3 commits intomainfrom
test/add-curl-wrapper-tests
Mar 18, 2025
Merged

test: add unit tests for curl wrapper#498
Soner (shyim) merged 3 commits intomainfrom
test/add-curl-wrapper-tests

Conversation

@shyim
Copy link
Copy Markdown
Member

This PR adds comprehensive unit tests for the curl wrapper package.

Changes

  • Added curl_wrapper_test.go with test coverage for:
    • Command initialization
    • HTTP method configuration
    • Bearer token authentication
    • Custom arguments handling
    • URL manipulation
    • Header management
    • Multiple options combination
    • Command options generation

Test Coverage

The tests cover all main functionality except the Run() method which requires system integration testing.

Notes

  • Uses testify/assert for cleaner test assertions
  • Follows Go 1.24 syntax and best practices
  • Implements table-driven tests where appropriate
  • Uses subtests for better organization and failure identification

@shyim Soner (shyim) merged commit fd94d6b into main Mar 18, 2025
5 checks passed
@shyim Soner (shyim) deleted the test/add-curl-wrapper-tests branch March 18, 2025 13:32
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.

1 participant