Commit 9975df0a authored by Tetiana Chupryna's avatar Tetiana Chupryna

Merge branch '345261_remove_multiple_gpg_signatures_ff' into 'master'

Remove feature flag multiple_gpg_signatures

See merge request gitlab-org/gitlab!78112
parents 16dcff3b e6f08a78
---
name: multiple_gpg_signatures
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74095
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/345261
milestone: '14.5'
type: development
group: group::source code
default_enabled: true
...@@ -102,7 +102,7 @@ module Gitlab ...@@ -102,7 +102,7 @@ module Gitlab
end end
def verification_status(gpg_key) def verification_status(gpg_key)
return :multiple_signatures if multiple_signatures? && Feature.enabled?(:multiple_gpg_signatures, @commit.project, default_enabled: :yaml) return :multiple_signatures if multiple_signatures?
return :unknown_key unless gpg_key return :unknown_key unless gpg_key
return :unverified_key unless gpg_key.verified? return :unverified_key unless gpg_key.verified?
return :unverified unless verified_signature&.valid? return :unverified unless verified_signature&.valid?
......
...@@ -233,30 +233,6 @@ RSpec.describe Gitlab::Gpg::Commit do ...@@ -233,30 +233,6 @@ RSpec.describe Gitlab::Gpg::Commit do
verification_status: 'multiple_signatures' verification_status: 'multiple_signatures'
) )
end end
context 'when feature flag is disabled' do
before do
stub_feature_flags(multiple_gpg_signatures: false)
end
it 'returns an valid signature' do
verified_signature = double('verified-signature', fingerprint: GpgHelpers::User1.fingerprint, valid?: true)
allow(GPGME::Crypto).to receive(:new).and_return(crypto)
allow(crypto).to receive(:verify).and_yield(verified_signature).and_yield(verified_signature)
signature = described_class.new(commit).signature
expect(signature).to have_attributes(
commit_sha: commit_sha,
project: project,
gpg_key: gpg_key,
gpg_key_primary_keyid: GpgHelpers::User1.primary_keyid,
gpg_key_user_name: GpgHelpers::User1.names.first,
gpg_key_user_email: GpgHelpers::User1.emails.first,
verification_status: 'verified'
)
end
end
end end
context 'commit signed with a subkey' do context 'commit signed with a subkey' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment