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 Custom response header e2e test #1776

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

ruixiansong
Copy link
Contributor

/assign @swetharepakula

@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 Aug 9, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @songrx1997. 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 Aug 9, 2022
@ruixiansong ruixiansong force-pushed the customResponseHeaderE2E branch from 3ee3352 to 7c24982 Compare August 26, 2022 20:48
Copy link
Member

@swetharepakula swetharepakula left a comment

Choose a reason for hiding this comment

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

This generally looks good to me. Some small suggestions. Can you rebase and update the PR as well. Thanks!

cmd/e2e-test/customresponseheaders_test.go Outdated Show resolved Hide resolved
pkg/backends/features/customresponseheaders.go Outdated Show resolved Hide resolved
cmd/e2e-test/customresponseheaders_test.go Outdated Show resolved Hide resolved
pkg/fuzz/helpers.go Show resolved Hide resolved
@swetharepakula
Copy link
Member

/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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 30, 2022
@ruixiansong ruixiansong force-pushed the customResponseHeaderE2E branch from 7c24982 to 43b25be Compare August 31, 2022 17:47
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 31, 2022
@ruixiansong ruixiansong force-pushed the customResponseHeaderE2E branch from 43b25be to 675d1eb Compare August 31, 2022 23:31
if _, err := bcCRUD.Create(tc.beConfig); err != nil {
t.Fatalf("error creating BackendConfig: %v", err)
}
t.Logf("\"%s\" BackendConfig created (%s/%s) ", tc.desc, s.Namespace, tc.beConfig.Name)
Copy link
Member

Choose a reason for hiding this comment

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

maybe create a test logger that will do this automatically or create a helper method that wraps the logger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a helper to prepend the desc to the log string.

@ruixiansong ruixiansong force-pushed the customResponseHeaderE2E branch from 675d1eb to f39a202 Compare September 7, 2022 23:59
return nil
}

func logHelper(desc string, format string) string {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe rename to logWithDesc?

Copy link
Member

Choose a reason for hiding this comment

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

It looks like with the default logging in golang, we are limited in our options. Lets rename to something like appendDesc so it is clear what the helper function is doing. Please also add a comment as to why we are doing this.

For the format maybe something like [%s]: %s?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the naming and format.

@ruixiansong ruixiansong force-pushed the customResponseHeaderE2E branch from f39a202 to 524a6fd Compare September 19, 2022 22:39
Copy link
Member

@swetharepakula swetharepakula left a comment

Choose a reason for hiding this comment

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

Thanks for the change!

/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 Sep 20, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: songrx1997, swetharepakula

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 Sep 20, 2022
@k8s-ci-robot k8s-ci-robot merged commit 4ce58db into kubernetes:master Sep 20, 2022
@ruixiansong ruixiansong deleted the customResponseHeaderE2E branch February 18, 2023 00:58
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.

3 participants