[WIP] Make tests work also for rootless containers#192
Draft
zmiklank wants to merge 2 commits intosclorg:masterfrom
Draft
[WIP] Make tests work also for rootless containers#192zmiklank wants to merge 2 commits intosclorg:masterfrom
zmiklank wants to merge 2 commits intosclorg:masterfrom
Conversation
- add -P to docker run when running container tests Publish all exposed ports to random ports on the host interface. Add function for getting actual mapped port, and do not use hardcoded 8080. Return 8080, only when port is not published (works in rootfull configuration in one subnet). - return "localhost" as an IP, if container itself does not have any IP assigned (when running in rootless state)
Contributor
Author
|
[test-all] |
Contributor
Author
|
[test-all] |
2 similar comments
Contributor
Author
|
[test-all] |
Member
|
[test-all] |
phracek
reviewed
Jun 20, 2022
| echo localhost | ||
| } | ||
|
|
||
| test_port() { |
Member
There was a problem hiding this comment.
This function could be a part of container-common-scripts.
The first parameter would be port and the second parameter would be a protocol
The results would be echo as you already have it.
Contributor
Author
There was a problem hiding this comment.
Sounds good. I will need to make time to get back to this soon and get this PR to a mergeable state.
Member
|
[test-all] |
Member
|
[test-openshift] |
3 similar comments
Contributor
Author
|
[test-openshift] |
Contributor
Author
|
[test-openshift] |
Contributor
Author
|
[test-openshift] |
Pull Request validationFailed🔴 Review - Missing review from a member (1 required) Success🟢 CI - All checks have passed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publish all exposed ports to random ports on the host interface.
Add function for getting actual mapped port, and do not use hardcoded
8080. Return 8080, only when port is not published (works in rootfull
configuration in one subnet).
return "localhost" as an IP, if container itself does not have any IP
assigned (when running in rootless state)
known issues -> rootfull configuration seem to run only for localhost:published_port combination
also needs support from container-common-scripts (WIP)
NOT INTENDED FOR MERGING YET.