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

Test: Replace t.error/fatal with assert/request in [rawnode_test.go] #177

Merged

Conversation

MrDXY
Copy link
Contributor

@MrDXY MrDXY commented Mar 5, 2024

Refactor: Replacing t.Error/t.Fatal with assert/require

This commit tries to eliminates boilerplate code in the testing suite by replacing occurrences
of t.Error and t.Fatal with assertions from the assert and require packages.

Changes Made:

  • Replaced instances of t.Error with assert
  • Replaced instances of t.Fatal with require

Affected Files:

  • [rawnode_test.go]

Part of: #146

@MrDXY MrDXY force-pushed the replace-test-errors-with-assert-(rawnode_test.go) branch 2 times, most recently from 10bdb68 to 62edf4d Compare March 5, 2024 05:35
@MrDXY MrDXY mentioned this pull request Mar 5, 2024
6 tasks
Copy link
Contributor

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

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

LGTM % a couple of nits.

rawnode_test.go Outdated Show resolved Hide resolved
rawnode_test.go Outdated Show resolved Hide resolved
@MrDXY MrDXY force-pushed the replace-test-errors-with-assert-(rawnode_test.go) branch from 62edf4d to 3f457bc Compare March 6, 2024 14:52
Copy link
Contributor

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

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

@ahrtr PTAL/merge

@pav-kv pav-kv requested a review from ahrtr March 6, 2024 15:05
@ahrtr
Copy link
Member

ahrtr commented Mar 7, 2024

Please rebase this PR to resolve the workflow failure.

@MrDXY MrDXY force-pushed the replace-test-errors-with-assert-(rawnode_test.go) branch from 3f457bc to f7430f3 Compare March 7, 2024 07:38
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

lgtm

Thanks

@ahrtr ahrtr merged commit ed26e90 into etcd-io:main Mar 7, 2024
10 checks passed
@MrDXY MrDXY deleted the replace-test-errors-with-assert-(rawnode_test.go) branch March 7, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants