Skip to content

Conversation

@mwbrooks
Copy link
Member

Summary

Related to #315, #316, #320, #321, #322, #323

This pull request refactors the remaining higher risk Table Tests from the Slice-to-Map Pattern. It's focused on tests with OS mocks, HTTP mocks, and nested logic.

Reviewers

This is the last one! Congrats, you've reached the end of the Slice-to-Map Conversion Book 📚

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone Jan 31, 2026
@mwbrooks mwbrooks self-assigned this Jan 31, 2026
@mwbrooks mwbrooks added docs M-T: Documentation work only semver:patch Use on pull requests to describe the release version increment labels Jan 31, 2026
@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.64%. Comparing base (0557fc1) to head (9a782c9).

Additional details and impacted files
@@                                  Coverage Diff                                   @@
##           mwbrooks-table-test-consistent-p6-medium-high-risk     #324      +/-   ##
======================================================================================
+ Coverage                                               64.61%   64.64%   +0.02%     
======================================================================================
  Files                                                     212      212              
  Lines                                                   17755    17755              
======================================================================================
+ Hits                                                    11473    11477       +4     
+ Misses                                                   5206     5203       -3     
+ Partials                                                 1076     1075       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +461 to +462
`Standalone workspace, AAA is requested \
(workspace ID passed into apps.approvals.requests.create)`: {
Copy link
Member Author

Choose a reason for hiding this comment

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

note: This naming convention is a little strange, but I decided to keep it 1-to-1 with current implementation.

if len(deployedApps) == 0 {
require.ErrorIs(t, err, os.ErrNotExist, "apps.json was not deleted")
} else {
for name, tc := range tests {
Copy link
Member Author

Choose a reason for hiding this comment

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

note: This ---/+++ looks scary, but it's just fixing this test by wrapping each iteration in a t.Run function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs M-T: Documentation work only semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants