mattermost/server/channels/app/plugin_api_tests
Jesse Hallam e3fbf8711f
MM-68149: Upgrade to Go 1.26.2 (#36418)
* MM-68149: upgrade to Go 1.26.2

Update go directive in go.mod and .go-version.

* MM-68149: replace pointer helpers with Go 1.26 new()

Go 1.26 extends the built-in new() to accept an initial value expression,
making typed-pointer helpers like model.NewPointer(x), bToP(x), and boolPtr(x)
redundant. Replace every call site with new(x) and remove the now-unused
helper functions and their //go:fix inline directives.

* MM-68149: apply go fix for reflect API and format-string changes

- reflect.Ptr → reflect.Pointer (renamed in Go 1.18, deprecated alias removed in 1.26)
- reflect range-over-struct: for i := 0; i < t.NumField(); i++ → for field := range t.Fields()
  and the equivalent for Methods() and interface types
- Fix format-string concatenation and variadic-arg mismatches flagged by go vet

* MM-68149: update JPEG fixtures and test infrastructure for Go 1.26 encoder

Go 1.26 ships a new image/jpeg encoder that produces slightly different output.
Regenerate all JPEG fixture files and switch the comparison helpers from
byte-equality to pixel-level comparison with a small per-channel tolerance,
so minor encoder drift across patch versions is handled automatically.

Add -update-fixtures flag to make it easy to regenerate fixtures after future
major Go upgrades. Document the update procedure in tests/README.md.

* MM-68149: CI check that go fix ./... produces no changes

* Fix real bugs flagged by CodeRabbit review

- group.go: set newGroup.MemberCount not group.MemberCount (member count
  was populated on the wrong variable and lost before publish/return)
- file_test.go: guard compareImage(GetFilePreview) on the preview slice
  length, not the thumbnail slice length (copy-paste error)
- config_test.go: remove duplicate MinimumLength assignment

* fixup! Fix real bugs flagged by CodeRabbit review
2026-05-12 15:59:12 +00:00
..
manual.test_configuration_will_be_saved_hook [MM-52924] Implement ConfigurationWillBeSaved plugin hook (#23567) 2023-06-12 18:23:02 -06:00
manual.test_http_hijack_plugin [MM-61517] Fix errcheck issues in channels/app/plugin_api_tests/manual.test_http_hijack_plugin (#29190) 2024-11-14 13:47:19 -06:00
manual.test_http_upgrade_websocket_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
manual.test_load_configuration_defaults_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
manual.test_load_configuration_plugin [MM-57194] Allow plugins to mark setting fields as secret (#27986) 2024-09-12 19:23:57 +02:00
manual.test_serve_metrics_plugin fixed errcheck in test_serve_metrics_plugin (#29289) 2024-11-15 21:02:17 +01:00
manual.test_websocket_remote_address Pass remote address in WebSocketMessageHasBeenPosted plugin hook (#27332) 2024-06-13 09:01:49 +02:00
manual.test_websocket_session Include session id in request payload of WebSocketMessageHasBeenPosted plugin hook (#25928) 2024-01-16 14:17:31 -06:00
test_bots_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_call_log_api_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_db_driver MM-68149: Upgrade to Go 1.26.2 (#36418) 2026-05-12 15:59:12 +00:00
test_get_bundle_path_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_get_channels_for_team_for_user_plugin Add whitespace linter (#24855) 2023-10-11 10:13:36 +02:00
test_get_direct_channel_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_get_plugin_status_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_get_profile_image_plugin Add whitespace linter (#24855) 2023-10-11 10:13:36 +02:00
test_kv [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
test_member_channels_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_members_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_search_channels_plugin Add whitespace linter (#24855) 2023-10-11 10:13:36 +02:00
test_search_posts_in_team_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_search_teams_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_send_mail_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_sessions_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_set_profile_image_plugin Add whitespace linter (#24855) 2023-10-11 10:13:36 +02:00
test_update_user_active_plugin MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
test_update_user_auth_plugin MM-68149: Upgrade to Go 1.26.2 (#36418) 2026-05-12 15:59:12 +00:00
test_update_user_roles_plugin add UpdateUserRoles to plugin api (#26615) 2024-03-29 19:22:54 -03:00
test_update_user_status_plugin Add whitespace linter (#24855) 2023-10-11 10:13:36 +02:00
basic_config.go MM-68149: Upgrade to Go 1.26.2 (#36418) 2026-05-12 15:59:12 +00:00