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

Add unit test cases for balancer lua module #4187

Conversation

s-shirayama
Copy link
Contributor

What this PR does / why we need it:
This PR adds unit test cases for balancer.lua's route_to_alternative_balancer() function.
Since I'm planning to fix #4028 and add more test cases for the change, I added test cases for existing logic of target function.

Which issue this PR fixes *(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) Related with #4028 (but not fix it)

Special notes for your reviewer:
N/A

@k8s-ci-robot
Copy link
Contributor

Welcome @s-shirayama!

It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/ingress-nginx has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 11, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @s-shirayama. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 11, 2019
@aledbf
Copy link
Member

aledbf commented Jun 11, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 11, 2019
@s-shirayama
Copy link
Contributor Author

/retest

@s-shirayama
Copy link
Contributor Author

/test pull-ingress-nginx-test

@codecov-io
Copy link

codecov-io commented Jun 11, 2019

Codecov Report

Merging #4187 into master will increase coverage by 0.93%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4187      +/-   ##
=========================================
+ Coverage   57.66%   58.6%   +0.93%     
=========================================
  Files          87      87              
  Lines        6463    6950     +487     
=========================================
+ Hits         3727    4073     +346     
- Misses       2306    2409     +103     
- Partials      430     468      +38
Impacted Files Coverage Δ
internal/ingress/metric/collectors/process.go 88.29% <0%> (-2.13%) ⬇️
cmd/nginx/flags.go 86.66% <0%> (-1.78%) ⬇️
internal/ingress/controller/controller.go 47.84% <0%> (+1.33%) ⬆️
internal/ingress/controller/template/template.go 87.35% <0%> (+3.11%) ⬆️

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 2879309...6f0d6b3. Read the comment docs.

@s-shirayama
Copy link
Contributor Author

s-shirayama commented Jun 11, 2019

pull-ingress-nginx-test job seems unstable..

1st trial : failed
2nd trial : failed
3rd trial : passed

@s-shirayama
Copy link
Contributor Author

Hi, @aledbf
What are the remaining works for this PR to be merged ?

@aledbf
Copy link
Member

aledbf commented Jun 13, 2019

@s-shirayama review from @ElvinEfendi

@ElvinEfendi
Copy link
Member

@s-shirayama I love these kind of PRs - thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 13, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ElvinEfendi, s-shirayama

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2019
@k8s-ci-robot k8s-ci-robot merged commit 57a0542 into kubernetes:master Jun 13, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Canary ingress with multiple paths behaves improperly
5 participants