Skip to content

TOOLS-4278 Convert mongoimport validation and reader tests to testify - #1075

Draft
autarch wants to merge 1 commit into
TOOLS-4278-convey-to-testify-mongoimport-commonfrom
TOOLS-4278-convey-to-testify-mongoimport-main-1
Draft

TOOLS-4278 Convert mongoimport validation and reader tests to testify#1075
autarch wants to merge 1 commit into
TOOLS-4278-convey-to-testify-mongoimport-commonfrom
TOOLS-4278-convey-to-testify-mongoimport-main-1

Conversation

@autarch

@autarch autarch commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Converts the first four Test* functions in mongoimport_test.go:
TestSplitInlineHeader, TestMongoImportValidateSettings,
TestGetSourceReader, and TestGetInputReader. The rest of the file stays
on GoConvey for now, so the dot-import remains until the last of these
tests is converted.

The 247-line validation suite becomes one table. Three of its original
Convey blocks called validateSettings() twice; each second call is
independent of the first -- the earlier call either mutates only fields
a fresh mock reproduces, or has its effect overwritten before the
assertion -- so they split into separate rows without changing what is
tested.

Three cases are named for behavior they don't assert: one "an error
should be thrown" and two "should complain" cases all assert no error.
Preserved as-is with a comment, rather than fixed, to keep this a
mechanical refactor.

55 runtime assertions before and after. No behavior change.

Converts the first four Test* functions in mongoimport_test.go:
TestSplitInlineHeader, TestMongoImportValidateSettings,
TestGetSourceReader, and TestGetInputReader. The rest of the file stays
on GoConvey for now, so the dot-import remains until the last of these
tests is converted.

The 247-line validation suite becomes one table. Three of its original
Convey blocks called validateSettings() twice; each second call is
independent of the first -- the earlier call either mutates only fields
a fresh mock reproduces, or has its effect overwritten before the
assertion -- so they split into separate rows without changing what is
tested.

Three cases are named for behavior they don't assert: one "an error
should be thrown" and two "should complain" cases all assert no error.
Preserved as-is with a comment, rather than fixed, to keep this a
mechanical refactor.

55 runtime assertions before and after. No behavior change.

autarch commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

1 participant