2a0cccc13e
Reassign secret token when regenerating one ## What does this MR do? This is an attempt to fix intermittent errors in out test suite. ```text Failures: 1) Gitlab::Shell memoized secret_token creates and links the secret token file Failure/Error: expect(File.read(secret_file).chomp).to eq(secret_token) expected: "690f959e206ab91acc54e1c605c7ff90" got: "cccb4e8df9360600271e61114d4e6e68" (compared using ==) # ./spec/lib/gitlab/backend/shell_spec.rb:47:in `block (3 levels) in <top (required)>' ``` It appears that `spec/lib/gitlab/backend/shell_spec.rb` tries to change the file that stores secret token, but `Gitlab::Shell` memoizes `@secret_token` on class level, so when it was already created by other tests (`spec/requests/api/internal_spec.rb` in this case), memoized token is not reassigned even if it was generated again with `ensure_secret_token!`. See merge request !6844 |
||
---|---|---|
.. | ||
auth | ||
backend | ||
badge | ||
bitbucket_import | ||
checks | ||
ci | ||
conflict | ||
data_builder | ||
database | ||
diff | ||
downtime_check | ||
fogbugz_import | ||
gfm | ||
git | ||
github_import | ||
gitlab_import | ||
google_code_import | ||
graphs | ||
import_export | ||
ldap | ||
markdown | ||
metrics | ||
middleware | ||
o_auth | ||
request_profiler | ||
saml | ||
sanitizers | ||
sherlock | ||
sidekiq_middleware | ||
slash_commands | ||
sql | ||
template | ||
access.rb | ||
app_logger.rb | ||
asciidoc.rb | ||
auth.rb | ||
award_emoji.rb | ||
bitbucket_import.rb | ||
blame.rb | ||
changes_list.rb | ||
closing_issue_extractor.rb | ||
color_schemes.rb | ||
config_helper.rb | ||
contributions_calendar.rb | ||
contributor.rb | ||
current_settings.rb | ||
database.rb | ||
devise_failure.rb | ||
downtime_check.rb | ||
emoji.rb | ||
exclusive_lease.rb | ||
git.rb | ||
git_access.rb | ||
git_access_status.rb | ||
git_access_wiki.rb | ||
git_logger.rb | ||
git_post_receive.rb | ||
git_ref_validator.rb | ||
gl_id.rb | ||
gon_helper.rb | ||
highlight.rb | ||
identifier.rb | ||
import_export.rb | ||
import_formatter.rb | ||
import_sources.rb | ||
incoming_email.rb | ||
issues_labels.rb | ||
key_fingerprint.rb | ||
lazy.rb | ||
lfs_token.rb | ||
logger.rb | ||
mail_room.rb | ||
markup_helper.rb | ||
metrics.rb | ||
other_markup.rb | ||
popen.rb | ||
production_logger.rb | ||
project_search_results.rb | ||
protocol_access.rb | ||
recaptcha.rb | ||
redis.rb | ||
reference_extractor.rb | ||
regex.rb | ||
repository_check_logger.rb | ||
request_profiler.rb | ||
routing.rb | ||
search_results.rb | ||
seeder.rb | ||
sentry.rb | ||
sherlock.rb | ||
sidekiq_logger.rb | ||
snippet_search_results.rb | ||
themes.rb | ||
timeless.rb | ||
upgrader.rb | ||
uploads_transfer.rb | ||
url_builder.rb | ||
url_sanitizer.rb | ||
user_access.rb | ||
utils.rb | ||
version_info.rb | ||
visibility_level.rb | ||
workhorse.rb |