Remove testify from config/config_test.go#1511
Open
renaudhartert-db wants to merge 6 commits intomainfrom
Open
Remove testify from config/config_test.go#1511renaudhartert-db wants to merge 6 commits intomainfrom
renaudhartert-db wants to merge 6 commits intomainfrom
Conversation
Replace testify/assert and testify/require with standard library assertions and google/go-cmp, consistent with the project's goal of minimizing third-party dependencies in new and updated test code. - Consolidate four separate TestHostType_* functions into one table-driven TestConfig_HostType - Convert assert.Equal/NoError/True/False/ErrorIs/Panics to stdlib equivalents (t.Errorf, t.Fatalf, errors.Is, defer/recover) - Use cmp.Diff for struct comparisons (OAuthAuthorizationServer) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ubuntu <renaud.hartert@databricks.com>
simonfaltum
approved these changes
Mar 3, 2026
Member
simonfaltum
left a comment
There was a problem hiding this comment.
Looks like a clean migration, thanks for doing this
The merge from main dropped the "AWS account without scheme" and "AWS DoD account without scheme" test cases from the TestConfig_HostType table. These were originally added in #1510 and cover schemeless host values in .databrickscfg profiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ubuntu <renaud.hartert@databricks.com>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
testify/assertandtestify/requirefromconfig/config_test.go,replacing them with standard library assertions and
google/go-cmp.Why
The project convention discourages testify in new and updated test code to
minimize third-party dependencies.
config/config_test.gowas one of thefiles still importing testify. This PR brings it in line with the preferred
style already used in the second half of the file and in newer test files.
What changed
Interface changes
None.
Behavioral changes
None — pure test refactor.
Internal changes
TestHostType_*functions into one table-drivenTestConfig_HostTypewith four cases.assert.Equal/assert.NoError/require.NoErrorwithif got != want { t.Errorf(...) }andif err != nil { t.Fatalf(...) }.assert.ErrorIswitherrors.Is.assert.Panicswithdefer/recover.assert.True/assert.Falsewith plainifchecks.cmp.DiffforOAuthAuthorizationServerstruct comparisons.testify/assertandtestify/requireimports; addederrors.How is this tested?
All 21 tests in
config/config_test.gopass locally viago test ./config/ -v.NO_CHANGELOG=true