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

Backfill integration tests for selecting log destinations #80

Merged
merged 1 commit into from
Aug 4, 2019
Merged

Backfill integration tests for selecting log destinations #80

merged 1 commit into from
Aug 4, 2019

Conversation

hoegaarden
Copy link

@hoegaarden hoegaarden commented Aug 1, 2019

What this PR does / why we need it:

It adds some integration tests around the flags

  • -log_dir
  • -log_file
  • -logtostderr
  • -alsologtostderr
  • -stderrthreshold

and how they play together.

Which issue(s) this PR fixes:
none

Special notes for your reviewer:

These tests are just capturing the current state. They show, I believe, some discrepancies around

  • -logtostderr & -stderrthreshold
  • when traces are printed to stderr

and potentially others. These tests might allow us to drive out changes and should guard against unintentionally change the current behaviour.

Related:

Release note:

NONE

@k8s-ci-robot
Copy link

Welcome @hoegaarden!

It looks like this is your first PR to kubernetes/klog 🎉. 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/klog 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 the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 1, 2019
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 1, 2019
@hoegaarden
Copy link
Author

/assign dims neolit123

Copy link
Member

@neolit123 neolit123 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 these very detailed tests @hoegaarden
i'm curious where are these going to be called?

but instead of "e2e tests" i would qualify them as "integration tests".

e2e/klog_test.go Outdated Show resolved Hide resolved
e2e/klog_test.go Outdated Show resolved Hide resolved
e2e/simple_klog/main.go Outdated Show resolved Hide resolved
@neolit123
Copy link
Member

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Aug 1, 2019
@hoegaarden
Copy link
Author

hoegaarden commented Aug 1, 2019

i'm curious where are these going to be called?

Well, those tests run as part of go test ./..., therefore currently on travis or locally when you run said go test.

but instead of "e2e tests" i would qualify them as "integration tests".

I don't have a strong opinion on that. It is not really about integrating different parts with each other but it is running a klog'ed executable (a small one but still) and inspecting how it behaves (at least certain aspects). But happy to rename that form e2e to integration.

All in all, thanks for your comments, I will try to address them shortly.

These tests test the flags
- -log_dir
- -log_file
- -logtostderr
- -alsologtostderr
- -stderrthreshold
and how they play together
@hoegaarden hoegaarden changed the title Backfill e2e test for selecting log destinations Backfill integration tests for selecting log destinations Aug 1, 2019
@hoegaarden
Copy link
Author

@neolit123 PTAL -- Thanks!

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 1, 2019
@dims
Copy link
Member

dims commented Aug 4, 2019

/approve
/lgtm

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, hoegaarden, neolit123

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 Aug 4, 2019
@k8s-ci-robot k8s-ci-robot merged commit ab4d90c into kubernetes:master Aug 4, 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. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. 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.

None yet

4 participants