Skip to content

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

Merged
ahrtr merged 1 commit intoetcd-io:mainfrom
MrDXY:replace-test-errors-with-assert-util-test
Apr 15, 2024
Merged

Test: Replace t.error/fatal with assert/request in [util_test.go] #196
ahrtr merged 1 commit intoetcd-io:mainfrom
MrDXY:replace-test-errors-with-assert-util-test

Conversation

@MrDXY
Copy link
Contributor

@MrDXY MrDXY commented Apr 15, 2024

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

This commit tries to eliminate 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:

  • [util_test.go]

Part of: #146

Signed-off-by: Xinyuan Du <xinyuandu@bupt.cn>
@MrDXY MrDXY mentioned this pull request Apr 15, 2024
6 tasks
@ahrtr ahrtr merged commit 2f1d0c5 into etcd-io:main Apr 15, 2024
@MrDXY MrDXY deleted the replace-test-errors-with-assert-util-test branch April 15, 2024 23:06
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