Skip to content

Integration tests wait for external IP of knative-ingressgateway.#1427

Merged
google-prow-robot merged 2 commits intoknative:masterfrom
tcnghia:integration-tests
Jun 29, 2018
Merged

Integration tests wait for external IP of knative-ingressgateway.#1427
google-prow-robot merged 2 commits intoknative:masterfrom
tcnghia:integration-tests

Conversation

@tcnghia
Copy link
Copy Markdown
Contributor

@tcnghia tcnghia commented Jun 29, 2018

In #1228 we added a new service knative-ingressgateway that we will use the external IP address to receive all our ingress traffic.

However, in the test I did not add a wait time for this IP address to come up. This PR will fix that.

In addition to that I notice that Pods in the Completed state will affect our logic in wait_for_running_pods. Fixing that also in this PR.

@tcnghia tcnghia requested a review from mattmoor June 29, 2018 22:51
@google-prow-robot google-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 29, 2018
@tcnghia tcnghia changed the title Integreation tests wait for external IP of knative-ingressgateway. Integration tests wait for external IP of knative-ingressgateway. Jun 29, 2018
@mattmoor mattmoor self-assigned this Jun 29, 2018
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

cc @adrcunha

@google-prow-robot google-prow-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 29, 2018
@adrcunha
Copy link
Copy Markdown
Contributor

/lgtm

Comment thread test/library.sh Outdated
local pods="$(kubectl get pods -n $1 2>/dev/null | grep -v NAME)"
local not_running=$(echo "${pods}" | grep -v Running | wc -l)
if [[ -n "${pods}" && ${not_running} == 0 ]]; then
if [[ -n "${pods}" && -z ${has_pending} ]]; 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.

Better put "${has_pending}" in quotes to avoid surprises with spaces.

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.

Done

Comment thread test/library.sh Outdated
echo -n "Waiting until all pods in namespace $1 are up"
local ns=$1
for i in {1..150}; do # timeout after 5 minutes
local has_pending=$(kubectl get pods -n $ns -o jsonpath='{.items[*].status.phase}' | grep Pending)
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.

Better put "$(...)" in quotes to avoid surprises with spaces.

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.

Done

Comment thread test/library.sh
return 1
}

# Waits until the given service has an external IP address.
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.

You need 2 parameters in this function, I suggest documenting $1 and $2 just like line 80, for example.

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.

Done. Thanks!

@mattmoor
Copy link
Copy Markdown
Member

/hold

@google-prow-robot google-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 29, 2018
@google-prow-robot google-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2018
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold cancel

@google-prow-robot google-prow-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 29, 2018
@adrcunha
Copy link
Copy Markdown
Contributor

/approve
/lgtm
/woof space

@google-prow-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrcunha, mattmoor, tcnghia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-prow-robot google-prow-robot merged commit 47ef582 into knative:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants