mattermost/server/channels/store/storetest
Jesse Hallam 71ca373de7
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (shard 0) (push) Blocked by required conditions
Server CI / Postgres (shard 1) (push) Blocked by required conditions
Server CI / Postgres (shard 2) (push) Blocked by required conditions
Server CI / Postgres (shard 3) (push) Blocked by required conditions
Server CI / Merge Postgres Test Results (push) Blocked by required conditions
Server CI / Postgres FIPS (shard 0) (push) Blocked by required conditions
Server CI / Postgres FIPS (shard 1) (push) Blocked by required conditions
Server CI / Postgres FIPS (shard 2) (push) Blocked by required conditions
Server CI / Postgres FIPS (shard 3) (push) Blocked by required conditions
Server CI / Merge Postgres FIPS Test Results (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Tools CI / check-style (mattermost-govet) (push) Waiting to run
Tools CI / Test (mattermost-govet) (push) Waiting to run
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-external-links (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
Generate instead of hard-coding test passwords, enforce new minimum for FIPS, shard CI, fix FIPS builds (#35905)
* Replace hardcoded test passwords with model.NewTestPassword()

Add model.NewTestPassword() utility that generates 14+ character
passwords meeting complexity requirements for FIPS compliance. Replace
all short hardcoded test passwords across the test suite with calls to
this function.

* Enforce FIPS compliance for passwords and HMAC keys

FIPS OpenSSL requires HMAC keys to be at least 14 bytes. PBKDF2 uses
the password as the HMAC key internally, so short passwords cause
PKCS5_PBKDF2_HMAC to fail.

- Add FIPSEnabled and PasswordFIPSMinimumLength build-tag constants
- Raise the password minimum length floor to 14 when compiled with
  requirefips, applied in SetDefaults only when unset and validated
  independently in IsValid
- Return ErrMismatchedHashAndPassword for too-short passwords in
  PBKDF2 CompareHashAndPassword rather than a cryptic OpenSSL error
- Validate atmos/camo HMAC key length under FIPS and lengthen test
  keys accordingly
- Adjust password validation tests to use PasswordFIPSMinimumLength
  so they work under both FIPS and non-FIPS builds

* CI: shard FIPS test suite and extract merge template

Run FIPS tests on PRs that touch go.mod or have 'fips' in the branch
name. Shard FIPS tests across 4 runners matching the normal Postgres
suite. Extract the test result merge logic into a reusable workflow
template to deduplicate the normal and FIPS merge jobs.

* more

* Fix email test helper to respect FIPS minimum password length

* Fix test helpers to respect FIPS minimum password length

* Remove unnecessary "disable strict password requirements" blocks from test helpers

* Fix CodeRabbit review comments on PR #35905

- Add server-test-merge-template.yml to server-ci.yml pull_request.paths
  so changes to the reusable merge workflow trigger Server CI validation
- Skip merge-postgres-fips-test-results job when test-postgres-normal-fips
  was skipped, preventing failures due to missing artifacts
- Set guest.Password on returned guest in CreateGuestAndClient helper
  to keep contract consistent with CreateUserWithClient
- Use shared LowercaseLetters/UppercaseLetters/NUMBERS/PasswordFIPSMinimumLength
  constants in NewTestPassword() to avoid drift if FIPS floor changes

https://claude.ai/code/session_01HmE9QkZM3cAoXn2J7XrK2f

* Rename FIPS test artifact to match server-ci-report pattern

The server-ci-report job searches for artifacts matching "*-test-logs",
so rename from postgres-server-test-logs-fips to
postgres-server-fips-test-logs to be included in the report.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-08 16:49:43 -03:00
..
mocks Merge the Integrated Boards MVP feature branch (#35796) 2026-03-27 10:36:35 +01:00
access_control_policy_store.go MM-63848: Enforce unique names for parent access control policies (#35676) 2026-03-25 05:12:13 -05:00
attributes_store.go Flag post API (#33765) 2025-10-02 20:24:29 +05:30
audit_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
autotranslation.go GetAllForObject, use Master instead of replica (#35356) 2026-02-20 14:47:55 -05:00
bot_store.go s/Get(Master|Replica)X/Get\1/g (#29520) 2024-12-10 09:57:19 -04:00
channel_bookmark.go MM-61375: Update file handling for bookmarks (#30034) 2025-02-13 17:11:13 -06:00
channel_member_history_store.go MM-67616: Refactor shared channel membership sync to use ChannelMemberHistory (#35619) 2026-03-23 10:12:17 -04:00
channel_store.go MM-67953 Changed sorting of channels in some places to prioritize display name matches (#35679) 2026-03-20 17:30:29 -04:00
channel_store_categories.go updated go to version 1.25.8 (#35817) 2026-03-27 21:11:52 +01:00
cluster_discovery_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
command_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
command_webhook_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
compliance_store.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
content_flagging_store.go Migrate content flagging settings to database (#33989) 2025-10-13 12:24:01 +05:30
desktop_tokens_store.go fixed most init errors in channels/store/storetest dir | 24 files edited (#26522) 2024-10-29 10:50:38 +01:00
draft_store.go MM-67380: COALESCE Drafts.Type to the empty string if NULL (#35109) 2026-01-29 21:14:56 +01:00
emoji_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
file_info_store.go Use testify ElementsMatch instead of sorting slices before comparison (#34899) 2026-01-13 11:40:03 -04:00
group_store.go fix: prevent sql.DB connectionCleaner race and harden flaky tests (#35891) 2026-03-31 16:58:09 -04:00
job_store.go MM-65661 - channel admin abac override previous jobs (#33872) 2025-09-26 12:33:31 +02:00
license_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
link_metadata_store.go Add URL validation to LinkMetadata cache and store (#31814) 2025-07-17 17:50:58 +02:00
notify_admin_store.go fixed most init errors in channels/store/storetest dir | 24 files edited (#26522) 2024-10-29 10:50:38 +01:00
oauth_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
outgoing_oauth_connection.go fixed most init errors in channels/store/storetest dir | 24 files edited (#26522) 2024-10-29 10:50:38 +01:00
plugin_store.go Use testify ElementsMatch instead of sorting slices before comparison (#34899) 2026-01-13 11:40:03 -04:00
post_acknowledgements_store.go Content flagging actions implementation tests (#35035) 2026-02-23 06:15:40 +05:30
post_persistent_notification_store.go [MM-62427] Add message attachments validation (#30180) 2025-03-20 12:53:50 +01:00
post_priority_store.go [MM-62427] Add message attachments validation (#30180) 2025-03-20 12:53:50 +01:00
post_store.go Merge the Integrated Boards MVP feature branch (#35796) 2026-03-27 10:36:35 +01:00
preference_store.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
product_notices_store.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
property_field_store.go Adds COALESCE guard for property fields before PSAv2 migrations (#35830) 2026-03-27 12:05:15 +01:00
property_group_store.go Adds the main Property System Architecture components (#29644) 2025-01-13 11:41:44 +00:00
property_value_store.go Merge the Integrated Boards MVP feature branch (#35796) 2026-03-27 10:36:35 +01:00
reaction_store.go [MM-64900] Migrate to use request.CTX instead of context.Context (#33541) 2025-09-18 16:14:24 +02:00
read_receipt_store.go [MM-61758] Burn on read feature (#34703) 2025-12-11 07:59:50 +01:00
remote_cluster_store.go Adds includeDeleted flag to get remote cluster app and store methods (#28182) 2024-09-13 23:08:53 +02:00
retention_policy_store.go Use testify ElementsMatch instead of sorting slices before comparison (#34899) 2026-01-13 11:40:03 -04:00
role_store.go [MM-67741] Scope role_updated WS events to affected team/channel (#35497) 2026-03-16 14:36:55 -04:00
scheduled_post_store.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
scheme_store.go [MM-67741] Scope role_updated WS events to affected team/channel (#35497) 2026-03-16 14:36:55 -04:00
session_store.go MM-62161: Replace SELECT * in session_store.go (#30422) 2025-03-12 19:35:33 +00:00
settings.go Add concurrentIndex vet rule and fix migrations (#35809) 2026-03-27 16:34:17 -03:00
shared_channel_store.go MM-68158: Fix shared channel remote display and notify UI on invite completion (#35908) 2026-04-03 02:06:01 -04:00
status_store.go [AI assisted] MM-64298: Process setting status offline in batches (#31065) 2025-06-17 09:20:34 +05:30
store.go Merge the Integrated Boards MVP feature branch (#35796) 2026-03-27 10:36:35 +01:00
storetestlib.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
system_store.go Deprecate admin advisor (#26045) 2024-02-26 09:05:00 +05:30
team_store.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
temporary_post_store.go Changes for BoR post soft-deletion (#35100) 2026-02-12 05:25:49 -05:00
terms_of_service_store.go MM-54502 - Update regex to force first character to be alpha (#24675) 2024-07-31 17:27:52 +03:00
thread_store.go Use testify ElementsMatch instead of sorting slices before comparison (#34899) 2026-01-13 11:40:03 -04:00
tokens_store.go MM-66299: type handling for ConsumeTokenOnce (#34247) 2025-10-22 18:03:33 -03:00
upload_session_store.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
user_access_token_store.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
user_store.go Generate instead of hard-coding test passwords, enforce new minimum for FIPS, shard CI, fix FIPS builds (#35905) 2026-04-08 16:49:43 -03:00
user_terms_of_service.go Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
utils.go MM-63368: Remove MySQL (#33458) 2025-07-22 20:40:55 +05:30
utils_test.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
view_store.go Merge the Integrated Boards MVP feature branch (#35796) 2026-03-27 10:36:35 +01:00
webhook_store.go [GH-26715] Added Pagination Support for IncomingWebHooks (#27502) 2024-08-09 16:44:22 -04:00