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

Removing dead code in tests #1501

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Removing dead code in tests #1501

merged 1 commit into from
Jun 22, 2022

Conversation

faradayfan
Copy link
Contributor

Change Overview

The PR removes some dead code in pkg/function/scale_test.go. The reasons for this proposed change are center around the idea that the use of SucceedNow() should be avoided. A few reasons for this are:

  1. It creates dead code. This results in a more complicated codebase without any benefit.
  2. It passes all assertions made by the c.Check() but not assertions made by c.Assert(). This is not very clear in the check.v1 documentation. This doesn't affect this case, but can result in inadvertent passing of a test.
  3. It's difficult to mock this behavior if a custom implementation of the check.v1 is used. This also makes it difficult to incrementally migrate away from check.v1.

Pull request type

Please check the type of change your PR introduces:

  • 🤖 Test

Issues

  • None

Test Plan

No functional change is made. Unit tests will be relied upon for validation.

  • ⚡ Unit test

@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Jun 21, 2022
Copy link
Contributor

@akankshakumari393 akankshakumari393 left a comment

Choose a reason for hiding this comment

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

LGTM

Kanister automation moved this from In Progress to Reviewer approved Jun 22, 2022
@mergify mergify bot merged commit 1249170 into master Jun 22, 2022
@mergify mergify bot deleted the scale-test-cleanup branch June 22, 2022 14:35
Kanister automation moved this from Reviewer approved to Done Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants