Skip to content

100% test coverage for validation.go#379

Merged
ChrisSchinnerl merged 35 commits intomasterfrom
matt/test-coverage
Feb 4, 2026
Merged

100% test coverage for validation.go#379
ChrisSchinnerl merged 35 commits intomasterfrom
matt/test-coverage

Conversation

@Alrighttt
Copy link
Contributor

This pull request adds test coverage for any remaining cases within validation.go.

Some tests are non-exhaustive and only add test cases that were previously missing. These are noted with developer comments.

@github-project-automation github-project-automation bot moved this to In Progress in Sia Jan 20, 2026
@Alrighttt
Copy link
Contributor Author

Fixing the failing Lint tests now.

@ChrisSchinnerl
Copy link
Member

@Alrighttt once this is ready make sure to assign PJ, Nate and me as reviewers.

@Alrighttt
Copy link
Contributor Author

This is already a beast to review, so I will continue with providing 100% test coverage in subsequent pull requests.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@n8mgr n8mgr left a comment

Choose a reason for hiding this comment

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

There are two duplicate test cases for "storage proof conflicts" you didn't add them, but might as well remove them.

Also this file is pretty large. I wouldn't move any existing tests, but if you added any new ones see if they might make sense in a new file i,.e. validation_txn_test.go. We should move existing tests in a follow-up so the diff isn't polluted.

Copy link
Member

@peterjan peterjan left a comment

Choose a reason for hiding this comment

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

Left some minor comments, LGTM otherwise. I must admit though I didn't read through every line here 😳

Copy link
Member

Choose a reason for hiding this comment

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

This case doesn't make sense. Since we're updating this file anyway we might as well take this along.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What code is this referencing?

Copy link
Member

@peterjan peterjan Feb 2, 2026

Choose a reason for hiding this comment

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

The assertions check whether errString is different from "" and then check whether it's equal.
case test.errString != "" && test.errString == "": line 2273

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Alrighttt
Copy link
Contributor Author

I addressed all review comments.

@Alrighttt Alrighttt requested review from n8mgr and peterjan February 2, 2026 16:20
@ChrisSchinnerl ChrisSchinnerl merged commit f5c740a into master Feb 4, 2026
12 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the matt/test-coverage branch February 4, 2026 09:33
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants