Skip to content

AO3-7541 Declare Elasticsearch requirements in request specs - #5965

Open
evanwhitt wants to merge 3 commits into
otwcode:masterfrom
evanwhitt:AO3-7541-requests-spec-es-metadata
Open

AO3-7541 Declare Elasticsearch requirements in request specs#5965
evanwhitt wants to merge 3 commits into
otwcode:masterfrom
evanwhitt:AO3-7541-requests-spec-es-metadata

Conversation

@evanwhitt

Copy link
Copy Markdown

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7541

Purpose

Some spec/requests specs render pages that query Elasticsearch but never say so. If a spec that does declare it (e.g. work_search: true) runs first, its cleanup deletes the indexes and the request specs blow up with index_not_found_exception.

Added the applicable search metadata (work_search, bookmark_search, collection_search, pseud_search) to the affected request specs so the indexes they need always exist, regardless of run order.

Testing Instructions

From the Jira issue:

bundle exec rspec spec/controllers/challenge_requests_controller_spec.rb spec/models/search/user_indexer_spec.rb spec/models/search/pseud_indexer_spec.rb spec/requests

All specs should pass. Also verify bundle exec rspec spec/requests passes on its own.

Credit

Evan W (he/him) [b1ume]

@github-actions github-actions Bot added Scope: Tests Only Only changes automated tests or test configuration Awaiting Review labels Aug 3, 2026
@evanwhitt
evanwhitt force-pushed the AO3-7541-requests-spec-es-metadata branch 2 times, most recently from 896d62c to 4c5dca1 Compare August 4, 2026 00:01
Comment thread spec/requests/works_n_plus_one_spec.rb
@evanwhitt
evanwhitt force-pushed the AO3-7541-requests-spec-es-metadata branch from a0267b3 to 02a1648 Compare August 10, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting Review Scope: Tests Only Only changes automated tests or test configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants