arquillian / arquillian-cube

Control (docker, kubernetes, openshift) containers in your tests with ease!
http://arquillian.org/arquillian-cube/
120 stars 98 forks source link

fix: avoid issuing invalid wait-for-it command #1149

Closed mstruk closed 4 years ago

mstruk commented 5 years ago

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:

bartoszmajsak commented 4 years ago

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

Many thanks @mstruk for your contribution!