Skip to content

Remove resolve-ip dependency for integration-tests#9065

Merged
jon-wei merged 3 commits intoapache:masterfrom
suneet-s:flaky-test
Dec 19, 2019
Merged

Remove resolve-ip dependency for integration-tests#9065
jon-wei merged 3 commits intoapache:masterfrom
suneet-s:flaky-test

Conversation

@suneet-s
Copy link
Copy Markdown
Contributor

@suneet-s suneet-s commented Dec 18, 2019

Partially fixes #7842

Description

Remove the dependency on resolve-ip for the integration tests by using hostname instead


This PR has:

  • been self-reviewed.

@suneet-s
Copy link
Copy Markdown
Contributor Author

@jon-wei

# limitations under the License.

DOCKER_HOST_IP="$(host "$(hostname)" | perl -nle '/has address (.*)/ && print $1')"
if [ "$DOCKER_HOST_IP" -eq "" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe -eq is for numeric comparisons. To check for an empty string: [ -z "$DOCKER_HOST_IP" ]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ahhh I thought shellcheck would yell at me if I used the wrong comparator type :(

if [ "$DOCKER_HOST_IP" -eq "" ]; then
DOCKER_HOST_IP="$(dscacheutil -q host -a name "$(HOSTNAME)" | perl -nle '/ip_address: (.*)/ && print $1')"
fi
export DOCKER_HOST_IP
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we fail the script if DOCKER_HOST_IP is still empty here?

Copy link
Copy Markdown
Contributor

@jon-wei jon-wei left a comment

Choose a reason for hiding this comment

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

LGTM after CI

@jon-wei jon-wei merged commit 176bc8f into apache:master Dec 19, 2019
@jihoonson jihoonson added this to the 0.18.0 milestone Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The instruction for running integration tests from integration-tests/README.md doesn't work

4 participants