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

Improve unit and e2e tests for ignoring non-service backends #7344

Closed
2 tasks
rikatz opened this issue Jul 13, 2021 · 5 comments · Fixed by #7545
Closed
2 tasks

Improve unit and e2e tests for ignoring non-service backends #7344

rikatz opened this issue Jul 13, 2021 · 5 comments · Fixed by #7545
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@rikatz
Copy link
Contributor

rikatz commented Jul 13, 2021

After PR #7332 @cpanato remembered me that I forgot to ask for unit and e2e tests 🤦‍♂️

As a follow up, those tests needs to be created:

  • Create unit tests for cases where the backend exists, but not the Service field
  • Create e2e tests for the same scenario, where an Ingress without a valid service backend should point to default backend

I'm marking this as a good first issue, first serving is the owner. If you wanna deal with this issue, please do a "/assign" as a comment and make sure no one else is dealing with this.

PLEASE LEAVE THIS ISSUE FOR FIRST TIME CONTRIBUTORS!

If you assign yourself into this issue and got stuck into something, please reach us in #ingress-nginx-dev at k8s slack.

/kind cleanup
/good-first-issue
/help

@k8s-ci-robot
Copy link
Contributor

@rikatz:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

After PR #7332 @cpanato remembered me that I forgot to ask for unit and e2e tests 🤦‍♂️

As a follow up, those tests needs to be created:

  • Create unit tests for cases where the backend exists, but not the Service field
  • Create e2e tests for the same scenario, where an Ingress without a valid service backend should point to default backend

I'm marking this as a good first issue, first serving is the owner. If you wanna deal with this issue, please do a "/assign" as a comment and make sure no one else is dealing with this.

If you assign yourself into this issue and got stuck into something, please reach us in #ingress-nginx-dev at k8s slack.

/kind cleanup
/good-first-issue
/help

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 kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jul 13, 2021
@Debanitrkl
Copy link
Member

/assign

@RenatoBrittoAraujo
Copy link
Contributor

Hi! Is this issue being developed or is it stale @Debanitrkl? If it's stale, I would like to take it, if possible.

@Debanitrkl
Copy link
Member

@RenatoBrittoAraujo yes you could take it

@RenatoBrittoAraujo
Copy link
Contributor

/assign

RenatoBrittoAraujo added a commit to GCES-Kubernetes/ingress-nginx that referenced this issue Aug 24, 2021
…s#7344)

Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>
MarcosNBJ pushed a commit to GCES-Kubernetes/ingress-nginx that referenced this issue Aug 25, 2021
…s#7344)

Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>
k8s-ci-robot pushed a commit that referenced this issue Aug 26, 2021
* Adding test cases for backend with nil service

Signed-off-by: Marcos <marcosnery.comp@gmail.com>
Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>

* Add e2e test for backend nil service and add nil safeguard (#7344)

Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>

* changing portuguese names to english in order to maintain the pattern

* updating boilerplate header

* adding second test case to also test valid path

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>

* Updating boilerplate

* fixing boilerplate

Signed-off-by: MarcosN <marcosnery.comp@gmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Gabriel Albino <enggabrielalbino@gmail.com>

* Improving template test for cases where a nil backend service is included

Signed-off-by: MarcosN <marcosnery.comp@gmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Gabriel Albino <enggabrielalbino@gmail.com>

Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>
Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
Co-authored-by: Gabriel Albino <enggabrielalbino@gmail.com>
rchshld pushed a commit to joomcode/ingress-nginx that referenced this issue May 19, 2023
…tes#7545)

* Adding test cases for backend with nil service

Signed-off-by: Marcos <marcosnery.comp@gmail.com>
Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>

* Add e2e test for backend nil service and add nil safeguard (kubernetes#7344)

Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>

* changing portuguese names to english in order to maintain the pattern

* updating boilerplate header

* adding second test case to also test valid path

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>

* Updating boilerplate

* fixing boilerplate

Signed-off-by: MarcosN <marcosnery.comp@gmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Gabriel Albino <enggabrielalbino@gmail.com>

* Improving template test for cases where a nil backend service is included

Signed-off-by: MarcosN <marcosnery.comp@gmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Gabriel Albino <enggabrielalbino@gmail.com>

Co-authored-by: Renato Araujo <renatobritto@protonmail.com>
Co-authored-by: André Goretti <andremotta96@gmail.com>
Co-authored-by: Kalebe Lopes <calbkalebe@gmail.com>
Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
Co-authored-by: Gabriel Albino <enggabrielalbino@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
4 participants