Skip to content
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

Fix /proc/net/tcp* check in InternalCommandPortListeningCheck t… #2195

Merged
merged 1 commit into from Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -29,7 +29,7 @@ public Boolean call() {
for (int internalPort : internalPorts) {
command += " && ";
command += " (";
command += format("cat /proc/net/tcp{,6} | awk '{print $2}' | grep -i :%x", internalPort);
command += format("cat /proc/net/tcp* | awk '{print $2}' | grep -i :%x", internalPort);
perlun marked this conversation as resolved.
Show resolved Hide resolved
command += " || ";
command += format("nc -vz -w 1 localhost %d", internalPort);
command += " || ";
Expand Down
Expand Up @@ -11,8 +11,8 @@

public class InternalCommandPortListeningCheckTest {

// Linking a custom configuration into the container so that nginx is listening on port 8080. This is necessary to proof
// that the command formatting uses the correct casing for hexadecimal numberd (i.e. 1F90 and not 1f90).
// Linking a custom configuration into the container so that nginx is listening on port 8080. This is necessary to prove
// that the command formatting uses the correct casing for hexadecimal numbers (i.e. 1F90 and not 1f90).
@Rule
public GenericContainer nginx = new GenericContainer<>("nginx:1.9.4")
.withClasspathResourceMapping("nginx_on_8080.conf", "/etc/nginx/conf.d/default.conf", BindMode.READ_ONLY);
Expand Down