Skip to content

chore(container): add comprehensive port mapping and endpoint tests#136

Open
diegolatorre16 wants to merge 1 commit intodocker:mainfrom
diegolatorre16:test-container-port-mapping
Open

chore(container): add comprehensive port mapping and endpoint tests#136
diegolatorre16 wants to merge 1 commit intodocker:mainfrom
diegolatorre16:test-container-port-mapping

Conversation

@diegolatorre16
Copy link

What does this PR do?

Add test for:

  • MappedPort with single/multiple ports and host network mode
  • Endpoint with protocol handling and lowest port selection
  • PortEndpoint for specific port endpoint generation
    All tests include positive and negative cases to ensure robust behavior.

Why is it important?

While these functions are covered by integration tests, having dedicated unit tests improves test clarity and makes it easier to identify failures when port mapping functionality breaks.

Related issues

Add test for:
- MappedPort with single/multiple ports and host network mode
- Endpoint with protocol handling and lowest port selection
- PortEndpoint for specific port endpoint generation
- Error cases for port not found and wrong protocol
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.

Tests for the ports.go file

1 participant