Commit 082c064d authored by charlie ablett's avatar charlie ablett

Merge branch 'jp-projetns-exclude-sync' into 'master'

Ignore customer sync for project namespaces

See merge request gitlab-org/gitlab!72986
parents ae05b90a 58bb1393
...@@ -105,7 +105,7 @@ module EE ...@@ -105,7 +105,7 @@ module EE
# Changing the plan or other details may invalidate this cache # Changing the plan or other details may invalidate this cache
before_save :clear_feature_available_cache before_save :clear_feature_available_cache
after_commit :sync_name_with_customers_dot, on: :update, if: -> { name_previously_changed? } after_commit :sync_name_with_customers_dot, on: :update, if: -> { name_previously_changed? && !project_namespace? }
end end
# Only groups can be marked for deletion # Only groups can be marked for deletion
......
...@@ -391,6 +391,12 @@ RSpec.describe Namespace do ...@@ -391,6 +391,12 @@ RSpec.describe Namespace do
include_examples 'no sync' include_examples 'no sync'
end end
context 'when project namespace' do
let(:namespace) { create(:project_namespace) }
include_examples 'no sync'
end
it 'triggers a name sync with CustomersDot' do it 'triggers a name sync with CustomersDot' do
expect(::Namespaces::SyncNamespaceNameWorker).to receive(:perform_async) expect(::Namespaces::SyncNamespaceNameWorker).to receive(:perform_async)
.with(namespace.id).once .with(namespace.id).once
......
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