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

Wl/webhook test #182

Merged
merged 86 commits into from
Aug 9, 2019
Merged

Wl/webhook test #182

merged 86 commits into from
Aug 9, 2019

Conversation

willfairwinds
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #182 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #182   +/-   ##
=======================================
  Coverage   82.84%   82.84%           
=======================================
  Files          10       10           
  Lines         647      647           
=======================================
  Hits          536      536           
  Misses         87       87           
  Partials       24       24

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dddeeb3...caa0b30. Read the comment docs.

Copy link
Contributor

@rbren rbren left a comment

Choose a reason for hiding this comment

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

Looks great! We just have to add these tests to CircleCI to get them to run every time someone submits a pull request.

To do this, you'll want to edit ./.circleci/config.yml:

  • add an install_kind section to references, with the commands necessary to install KIND
  • add the lines * install_kind and run: ./test/webhook_test.sh to the test job

I think that should do it!

test/webhook_test.sh Outdated Show resolved Hide resolved
test/webhook_test.sh Outdated Show resolved Hide resolved
test/webhook_test.sh Outdated Show resolved Hide resolved
test/webhook_test.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@rbren rbren left a comment

Choose a reason for hiding this comment

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

Looks great! Just have some unused code to clean out, otherwise I think this is ready to go

echo "Webhook started!"
}

function check_dashboard_is_ready() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can get rid of this now


# Install the webhook and dashboard
kubectl apply -f ./deploy/webhook.yaml &> /dev/null
kubectl apply -f ./deploy/dashboard.yaml &> /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

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

You can get rid of this line


# wait for the webhook and dashboard to come online
check_webhook_is_ready
check_dashboard_is_ready
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

@@ -130,7 +130,8 @@ jobs:
steps:
- checkout
- *install_k8s
- *test_kube_dashboard
Copy link
Contributor

Choose a reason for hiding this comment

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

You can get rid of test_kube_dashboard above now

timeout_epoch=$(date -d "+2 minutes" +%s)
echo "Waiting for dashboard to be ready"
while ! kubectl get pods -n polaris | grep -E "dashboard.*1/1.*Running"; do
echo -n "."
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need a check_timeout "${timeout_epoch}" above this

Copy link
Contributor

@rbren rbren left a comment

Choose a reason for hiding this comment

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

One comment on the dashboard timeout, but once that's done I think we're ready to merge!

Be sure to use "Squash and merge" when you merge this - lots of commits in there :)

@willfairwinds willfairwinds merged commit 467ab94 into master Aug 9, 2019
@willfairwinds willfairwinds deleted the wl/webhook-test branch August 9, 2019 20:01
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.

3 participants