Skip to content

Conversation

@mstruk
Copy link
Contributor

@mstruk mstruk commented Oct 3, 2019

The default wait-for-it script is easily invoked without a HOST, because internalIP easily resolves to empty string.

An example invocation which can never succeed because it's syntactically incorrect:

/tmp/wait-for-it.sh :8080 -s -- echo Service is Up

We can go an extra step, and make sure that a non-empty HOST is set. we may not default to a good value but at least it's one that sometimes works.

Changes proposed in this pull request:

  • if internalIP is empty, default to containerIP, if that one is also empty default to localhost

@bartoszmajsak
Copy link
Member

This LGTM but would like to hear an opinion from @lordofthejars.

Many thanks @mstruk for your contribution!

Copy link
Member

@bartoszmajsak bartoszmajsak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@bartoszmajsak bartoszmajsak changed the title Avoid issuing invalid wait-for-it command - HOST must not be empty fix: avoid issuing invalid wait-for-it command Mar 20, 2020
@bartoszmajsak bartoszmajsak merged commit 4a7e39f into arquillian:master Mar 20, 2020
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.

2 participants