Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-23 09:09:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-23 09:09:38 +0300
commit45205f0db533235111ac4e14032b395e76b526be (patch)
treeefc32f75692424f5b9228b9135ae916238dccf0f /spec/lib
parenta0ebcf42d29ee1272f2ebcbbde900b4832a241a2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/gpg_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gpg_spec.rb b/spec/lib/gitlab/gpg_spec.rb
index 72c6c8efb5e..66ce2d5cb8a 100644
--- a/spec/lib/gitlab/gpg_spec.rb
+++ b/spec/lib/gitlab/gpg_spec.rb
@@ -143,6 +143,11 @@ RSpec.describe Gitlab::Gpg do
end
it 'keeps track of created and removed keychains in counters' do
+ # Gitlab::Gpg may be memoizing stale counters if a preceding spec resets the Prometheus registry
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/286874
+ described_class.remove_instance_variable(:@tmp_keychains_created)
+ described_class.remove_instance_variable(:@tmp_keychains_removed)
+
created = Gitlab::Metrics.counter(:gpg_tmp_keychains_created_total, 'The number of temporary GPG keychains')
removed = Gitlab::Metrics.counter(:gpg_tmp_keychains_removed_total, 'The number of temporary GPG keychains')