-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Make tests work also for rootless containers #192
base: master
Are you sure you want to change the base?
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)
[test-all] |
[test-all] |
2 similar comments
[test-all] |
[test-all] |
echo localhost | ||
} | ||
|
||
test_port() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I will need to make time to get back to this soon and get this PR to a mergeable state.
[test-all] |
[test-openshift] |
3 similar comments
[test-openshift] |
[test-openshift] |
[test-openshift] |
Pull Request validationFailed🔴 Review - Missing review from a member (2 required) Success🟢 CI - All checks have passed |
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.