Commit graph

2 commits

Author SHA1 Message Date
Michael Kozono
b720ea0613 Fix RequestStore-related test failure
The test was failing
https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/101444126 because
a04056efad/ee/spec/support/request_store.rb
which is in EE only, clears the RequestStore before every test,
regardless of whether RequestStore is active. This test is unusual
because it sets up RequestStore without it being active, to make sure
that the tested code doesn’t attempt to use RequestStore. These two
unusual facts combined to cause the failure in EE only. The fix works
because of the particular order of RSpec hooks in the test lifecycle.
2018-09-25 13:24:37 -07:00
Michael Kozono
45cf64c827 Use a null object with RequestStore
Makes it easier and safer to use RequestStore because you don't need to
check `RequestStore.active?` before using it. You just have to use
`Gitlab::SafeRequestStore` instead.
2018-09-24 12:11:26 -07:00