Skip to content

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Dec 1, 2025

🔧 Changes

This PR updates the testing infrastructure and SDK code. Key changes include:

Testing Infrastructure Overhaul

  • Replaced testcontainers with WireMock Docker Compose: Migrated from testcontainers to a simpler WireMock docker-compose setup for testing
  • Added wiremock/docker-compose.test.yml: New docker-compose configuration for WireMock
  • Added wiremock/wiremock-mappings.json: WireMock stub mappings for API mocking
  • Updated Makefile: Test targets now automatically start/stop WireMock container

Dependency Cleanup

  • Removed wiremock testcontainers dependencies
  • Removed all transitive dependencies related to testcontainers (Docker, OpenTelemetry, etc.)
  • Significantly reduced go.sum file size

Test Code Refactoring

  • Simplified all WireMock test files to use direct HTTP calls to WireMock admin API
  • Removed TestMain setup functions that initialized testcontainers
  • Added ResetWireMockRequests and VerifyRequestCount helper functions
  • Tests now connect to http://localhost:8080 (WireMock default)

SDK Code Changes

  • Updated Page type signature to include Response in generic parameters: core.Page[*Cursor, *Item, *Response]
  • Updated PageRequest and PageResponse to use core package types
  • All paginated methods now expose the full response object

📚 References

  • Auto-generated from latest Auth0 API definition

🔬 Testing

  • Tests use WireMock for HTTP mocking
  • Run make test to execute tests (automatically starts WireMock container)
  • WireMock container is automatically cleaned up after tests

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@fern-api fern-api bot requested a review from a team as a code owner December 1, 2025 13:32
- Removed dependency on wiremock-testcontainers-go for WireMock setup.
- Introduced helper functions to create and reset WireMock stubs.
- Updated test cases to use new stub creation method for OAuth token endpoint and action versions.
- Simplified test setup by eliminating unnecessary global variables and container management.
@developerkunal developerkunal changed the title 🌿 Fern Regeneration -- December 1, 2025 Migrate testing infrastructure to WireMock Docker Compose Dec 1, 2025
@developerkunal developerkunal changed the title Migrate testing infrastructure to WireMock Docker Compose chore: Migrate testing infrastructure to WireMock Docker Compose Dec 1, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 99.11111% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.80%. Comparing base (3d07f43) to head (ae7fdfb).

Files with missing lines Patch % Lines
management/internal/pager.go 88.88% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #661      +/-   ##
==========================================
+ Coverage   22.78%   22.80%   +0.02%     
==========================================
  Files         302      302              
  Lines      110013   110183     +170     
==========================================
+ Hits        25067    25128      +61     
- Misses      83100    83211     +111     
+ Partials     1846     1844       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants