Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
313c82d0
Commit
313c82d0
authored
May 20, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename bugzilla service
Renames `bugzilla_service` to `bugzilla_integration`
parent
b8293b2f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22 additions
and
22 deletions
+22
-22
app/models/integration.rb
app/models/integration.rb
+1
-1
app/models/project.rb
app/models/project.rb
+1
-1
spec/factories/integrations.rb
spec/factories/integrations.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_issue_trackers_sensitive_data_spec.rb
...d_migration/migrate_issue_trackers_sensitive_data_spec.rb
+5
-5
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+1
-1
spec/migrations/20190924152703_migrate_issue_trackers_data_spec.rb
...ations/20190924152703_migrate_issue_trackers_data_spec.rb
+2
-2
spec/migrations/20200130145430_reschedule_migrate_issue_trackers_data_spec.rb
...0130145430_reschedule_migrate_issue_trackers_data_spec.rb
+6
-6
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
spec/requests/api/graphql/project/base_service_spec.rb
spec/requests/api/graphql/project/base_service_spec.rb
+1
-1
spec/services/issues/close_service_spec.rb
spec/services/issues/close_service_spec.rb
+1
-1
spec/services/system_notes/issuables_service_spec.rb
spec/services/system_notes/issuables_service_spec.rb
+1
-1
spec/workers/propagate_integration_inherit_worker_spec.rb
spec/workers/propagate_integration_inherit_worker_spec.rb
+1
-1
No files found.
app/models/integration.rb
View file @
313c82d0
...
@@ -229,7 +229,7 @@ class Integration < ApplicationRecord
...
@@ -229,7 +229,7 @@ class Integration < ApplicationRecord
end
end
# used as part of the renaming effort
# used as part of the renaming effort
RENAMED_TO_INTEGRATION
=
%w[asana assembla bamboo]
.
freeze
RENAMED_TO_INTEGRATION
=
%w[asana assembla bamboo
bugzilla
]
.
freeze
def
self
.
available_integration_names
(
**
args
)
def
self
.
available_integration_names
(
**
args
)
available_services_names
(
**
args
)
available_services_names
(
**
args
)
...
...
app/models/project.rb
View file @
313c82d0
...
@@ -158,7 +158,7 @@ class Project < ApplicationRecord
...
@@ -158,7 +158,7 @@ class Project < ApplicationRecord
has_one
:asana_integration
,
class_name:
'Integrations::Asana'
has_one
:asana_integration
,
class_name:
'Integrations::Asana'
has_one
:assembla_integration
,
class_name:
'Integrations::Assembla'
has_one
:assembla_integration
,
class_name:
'Integrations::Assembla'
has_one
:bamboo_integration
,
class_name:
'Integrations::Bamboo'
has_one
:bamboo_integration
,
class_name:
'Integrations::Bamboo'
has_one
:bugzilla_
service
,
class_name:
'Integrations::Bugzilla'
has_one
:bugzilla_
integration
,
class_name:
'Integrations::Bugzilla'
has_one
:buildkite_service
,
class_name:
'Integrations::Buildkite'
has_one
:buildkite_service
,
class_name:
'Integrations::Buildkite'
has_one
:campfire_service
,
class_name:
'Integrations::Campfire'
has_one
:campfire_service
,
class_name:
'Integrations::Campfire'
has_one
:confluence_service
,
class_name:
'Integrations::Confluence'
has_one
:confluence_service
,
class_name:
'Integrations::Confluence'
...
...
spec/factories/integrations.rb
View file @
313c82d0
...
@@ -85,7 +85,7 @@ FactoryBot.define do
...
@@ -85,7 +85,7 @@ FactoryBot.define do
confluence_url
{
'https://example.atlassian.net/wiki'
}
confluence_url
{
'https://example.atlassian.net/wiki'
}
end
end
factory
:bugzilla_
service
,
class:
'Integrations::Bugzilla'
do
factory
:bugzilla_
integration
,
class:
'Integrations::Bugzilla'
do
project
project
active
{
true
}
active
{
true
}
issue_tracker
issue_tracker
...
...
spec/lib/gitlab/background_migration/migrate_issue_trackers_sensitive_data_spec.rb
View file @
313c82d0
...
@@ -291,7 +291,7 @@ RSpec.describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, s
...
@@ -291,7 +291,7 @@ RSpec.describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, s
services
.
create!
(
id:
20
,
type:
'JiraService'
,
properties:
jira_properties
.
to_json
,
category:
'issue_tracker'
)
services
.
create!
(
id:
20
,
type:
'JiraService'
,
properties:
jira_properties
.
to_json
,
category:
'issue_tracker'
)
end
end
let!
(
:bugzilla_
service
_valid
)
do
let!
(
:bugzilla_
integration
_valid
)
do
services
.
create!
(
id:
11
,
type:
'BugzillaService'
,
title:
nil
,
properties:
tracker_properties
.
to_json
,
category:
'issue_tracker'
)
services
.
create!
(
id:
11
,
type:
'BugzillaService'
,
title:
nil
,
properties:
tracker_properties
.
to_json
,
category:
'issue_tracker'
)
end
end
...
@@ -314,14 +314,14 @@ RSpec.describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, s
...
@@ -314,14 +314,14 @@ RSpec.describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, s
expect
(
jira_service_valid
.
title
).
to
eq
(
title
)
expect
(
jira_service_valid
.
title
).
to
eq
(
title
)
expect
(
jira_service_valid
.
description
).
to
eq
(
description
)
expect
(
jira_service_valid
.
description
).
to
eq
(
description
)
bugzilla_
service
_valid
.
reload
bugzilla_
integration
_valid
.
reload
data
=
IssueTrackerData
.
find_by
(
service_id:
bugzilla_
service
_valid
.
id
)
data
=
IssueTrackerData
.
find_by
(
service_id:
bugzilla_
integration
_valid
.
id
)
expect
(
data
.
project_url
).
to
eq
(
url
)
expect
(
data
.
project_url
).
to
eq
(
url
)
expect
(
data
.
issues_url
).
to
eq
(
issues_url
)
expect
(
data
.
issues_url
).
to
eq
(
issues_url
)
expect
(
data
.
new_issue_url
).
to
eq
(
new_issue_url
)
expect
(
data
.
new_issue_url
).
to
eq
(
new_issue_url
)
expect
(
bugzilla_
service
_valid
.
title
).
to
eq
(
title
)
expect
(
bugzilla_
integration
_valid
.
title
).
to
eq
(
title
)
expect
(
bugzilla_
service
_valid
.
description
).
to
eq
(
description
)
expect
(
bugzilla_
integration
_valid
.
description
).
to
eq
(
description
)
end
end
end
end
end
end
spec/lib/gitlab/import_export/all_models.yml
View file @
313c82d0
...
@@ -391,7 +391,7 @@ project:
...
@@ -391,7 +391,7 @@ project:
-
redmine_service
-
redmine_service
-
youtrack_service
-
youtrack_service
-
custom_issue_tracker_service
-
custom_issue_tracker_service
-
bugzilla_
service
-
bugzilla_
integration
-
ewm_service
-
ewm_service
-
external_wiki_service
-
external_wiki_service
-
mock_ci_service
-
mock_ci_service
...
...
spec/migrations/20190924152703_migrate_issue_trackers_data_spec.rb
View file @
313c82d0
...
@@ -22,7 +22,7 @@ RSpec.describe MigrateIssueTrackersData do
...
@@ -22,7 +22,7 @@ RSpec.describe MigrateIssueTrackersData do
services
.
create!
(
type:
'JiraService'
,
properties:
nil
,
category:
'issue_tracker'
)
services
.
create!
(
type:
'JiraService'
,
properties:
nil
,
category:
'issue_tracker'
)
end
end
let!
(
:bugzilla_
service
)
do
let!
(
:bugzilla_
integration
)
do
services
.
create!
(
type:
'BugzillaService'
,
properties:
properties
,
category:
'issue_tracker'
)
services
.
create!
(
type:
'BugzillaService'
,
properties:
properties
,
category:
'issue_tracker'
)
end
end
...
@@ -55,7 +55,7 @@ RSpec.describe MigrateIssueTrackersData do
...
@@ -55,7 +55,7 @@ RSpec.describe MigrateIssueTrackersData do
freeze_time
do
freeze_time
do
migrate!
migrate!
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
3
.
minutes
,
jira_service
.
id
,
bugzilla_
service
.
id
)
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
3
.
minutes
,
jira_service
.
id
,
bugzilla_
integration
.
id
)
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
6
.
minutes
,
youtrack_service
.
id
,
gitlab_service
.
id
)
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
6
.
minutes
,
youtrack_service
.
id
,
gitlab_service
.
id
)
expect
(
BackgroundMigrationWorker
.
jobs
.
size
).
to
eq
(
2
)
expect
(
BackgroundMigrationWorker
.
jobs
.
size
).
to
eq
(
2
)
end
end
...
...
spec/migrations/20200130145430_reschedule_migrate_issue_trackers_data_spec.rb
View file @
313c82d0
...
@@ -22,7 +22,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
...
@@ -22,7 +22,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
services
.
create!
(
id:
11
,
type:
'JiraService'
,
properties:
nil
,
category:
'issue_tracker'
)
services
.
create!
(
id:
11
,
type:
'JiraService'
,
properties:
nil
,
category:
'issue_tracker'
)
end
end
let!
(
:bugzilla_
service
)
do
let!
(
:bugzilla_
integration
)
do
services
.
create!
(
id:
12
,
type:
'BugzillaService'
,
properties:
properties
,
category:
'issue_tracker'
)
services
.
create!
(
id:
12
,
type:
'BugzillaService'
,
properties:
properties
,
category:
'issue_tracker'
)
end
end
...
@@ -56,7 +56,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
...
@@ -56,7 +56,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
freeze_time
do
freeze_time
do
migrate!
migrate!
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
3
.
minutes
,
jira_service
.
id
,
bugzilla_
service
.
id
)
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
3
.
minutes
,
jira_service
.
id
,
bugzilla_
integration
.
id
)
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
6
.
minutes
,
youtrack_service
.
id
,
gitlab_service
.
id
)
expect
(
migration_name
).
to
be_scheduled_delayed_migration
(
6
.
minutes
,
youtrack_service
.
id
,
gitlab_service
.
id
)
expect
(
BackgroundMigrationWorker
.
jobs
.
size
).
to
eq
(
2
)
expect
(
BackgroundMigrationWorker
.
jobs
.
size
).
to
eq
(
2
)
end
end
...
@@ -70,7 +70,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
...
@@ -70,7 +70,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!
(
:valid_issue_tracker_data
)
do
let!
(
:valid_issue_tracker_data
)
do
issue_tracker_data
.
create!
(
issue_tracker_data
.
create!
(
service_id:
bugzilla_
service
.
id
,
service_id:
bugzilla_
integration
.
id
,
encrypted_issues_url:
'http://url.com'
,
encrypted_issues_url:
'http://url.com'
,
encrypted_issues_url_iv:
'somevalue'
encrypted_issues_url_iv:
'somevalue'
)
)
...
@@ -78,7 +78,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
...
@@ -78,7 +78,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!
(
:invalid_issue_tracker_data
)
do
let!
(
:invalid_issue_tracker_data
)
do
issue_tracker_data
.
create!
(
issue_tracker_data
.
create!
(
service_id:
bugzilla_
service
.
id
,
service_id:
bugzilla_
integration
.
id
,
encrypted_issues_url:
'http:url.com'
,
encrypted_issues_url:
'http:url.com'
,
encrypted_issues_url_iv:
nil
encrypted_issues_url_iv:
nil
)
)
...
@@ -86,7 +86,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
...
@@ -86,7 +86,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!
(
:valid_jira_tracker_data
)
do
let!
(
:valid_jira_tracker_data
)
do
jira_tracker_data
.
create!
(
jira_tracker_data
.
create!
(
service_id:
bugzilla_
service
.
id
,
service_id:
bugzilla_
integration
.
id
,
encrypted_url:
'http://url.com'
,
encrypted_url:
'http://url.com'
,
encrypted_url_iv:
'somevalue'
encrypted_url_iv:
'somevalue'
)
)
...
@@ -94,7 +94,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
...
@@ -94,7 +94,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!
(
:invalid_jira_tracker_data
)
do
let!
(
:invalid_jira_tracker_data
)
do
jira_tracker_data
.
create!
(
jira_tracker_data
.
create!
(
service_id:
bugzilla_
service
.
id
,
service_id:
bugzilla_
integration
.
id
,
encrypted_url:
'http://url.com'
,
encrypted_url:
'http://url.com'
,
encrypted_url_iv:
nil
encrypted_url_iv:
nil
)
)
...
...
spec/models/project_spec.rb
View file @
313c82d0
...
@@ -64,7 +64,7 @@ RSpec.describe Project, factory_default: :keep do
...
@@ -64,7 +64,7 @@ RSpec.describe Project, factory_default: :keep do
it
{
is_expected
.
to
have_one
(
:redmine_service
)
}
it
{
is_expected
.
to
have_one
(
:redmine_service
)
}
it
{
is_expected
.
to
have_one
(
:youtrack_service
)
}
it
{
is_expected
.
to
have_one
(
:youtrack_service
)
}
it
{
is_expected
.
to
have_one
(
:custom_issue_tracker_service
)
}
it
{
is_expected
.
to
have_one
(
:custom_issue_tracker_service
)
}
it
{
is_expected
.
to
have_one
(
:bugzilla_
service
)
}
it
{
is_expected
.
to
have_one
(
:bugzilla_
integration
)
}
it
{
is_expected
.
to
have_one
(
:ewm_service
)
}
it
{
is_expected
.
to
have_one
(
:ewm_service
)
}
it
{
is_expected
.
to
have_one
(
:external_wiki_service
)
}
it
{
is_expected
.
to
have_one
(
:external_wiki_service
)
}
it
{
is_expected
.
to
have_one
(
:confluence_service
)
}
it
{
is_expected
.
to
have_one
(
:confluence_service
)
}
...
...
spec/requests/api/graphql/project/base_service_spec.rb
View file @
313c82d0
...
@@ -8,7 +8,7 @@ RSpec.describe 'query Jira service' do
...
@@ -8,7 +8,7 @@ RSpec.describe 'query Jira service' do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:jira_service
)
{
create
(
:jira_service
,
project:
project
)
}
let_it_be
(
:jira_service
)
{
create
(
:jira_service
,
project:
project
)
}
let_it_be
(
:bugzilla_
service
)
{
create
(
:bugzilla_service
,
project:
project
)
}
let_it_be
(
:bugzilla_
integration
)
{
create
(
:bugzilla_integration
,
project:
project
)
}
let_it_be
(
:redmine_service
)
{
create
(
:redmine_service
,
project:
project
)
}
let_it_be
(
:redmine_service
)
{
create
(
:redmine_service
,
project:
project
)
}
let
(
:query
)
do
let
(
:query
)
do
...
...
spec/services/issues/close_service_spec.rb
View file @
313c82d0
...
@@ -103,7 +103,7 @@ RSpec.describe Issues::CloseService do
...
@@ -103,7 +103,7 @@ RSpec.describe Issues::CloseService do
end
end
context
'with an active external issue tracker not supporting close_issue'
do
context
'with an active external issue tracker not supporting close_issue'
do
let!
(
:external_issue_tracker
)
{
create
(
:bugzilla_
service
,
project:
project
)
}
let!
(
:external_issue_tracker
)
{
create
(
:bugzilla_
integration
,
project:
project
)
}
it
'does not close the issue on the external issue tracker'
do
it
'does not close the issue on the external issue tracker'
do
project
.
reload
project
.
reload
...
...
spec/services/system_notes/issuables_service_spec.rb
View file @
313c82d0
...
@@ -735,7 +735,7 @@ RSpec.describe ::SystemNotes::IssuablesService do
...
@@ -735,7 +735,7 @@ RSpec.describe ::SystemNotes::IssuablesService do
end
end
it
'is true with issue tracker not supporting referencing'
do
it
'is true with issue tracker not supporting referencing'
do
create
(
:bugzilla_
service
,
project:
project
)
create
(
:bugzilla_
integration
,
project:
project
)
project
.
reload
project
.
reload
expect
(
service
.
cross_reference_disallowed?
(
noteable
)).
to
be_truthy
expect
(
service
.
cross_reference_disallowed?
(
noteable
)).
to
be_truthy
...
...
spec/workers/propagate_integration_inherit_worker_spec.rb
View file @
313c82d0
...
@@ -6,7 +6,7 @@ RSpec.describe PropagateIntegrationInheritWorker do
...
@@ -6,7 +6,7 @@ RSpec.describe PropagateIntegrationInheritWorker do
describe
'#perform'
do
describe
'#perform'
do
let_it_be
(
:integration
)
{
create
(
:redmine_service
,
:instance
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_service
,
:instance
)
}
let_it_be
(
:integration1
)
{
create
(
:redmine_service
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration1
)
{
create
(
:redmine_service
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration2
)
{
create
(
:bugzilla_
service
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration2
)
{
create
(
:bugzilla_
integration
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration3
)
{
create
(
:redmine_service
)
}
let_it_be
(
:integration3
)
{
create
(
:redmine_service
)
}
it_behaves_like
'an idempotent worker'
do
it_behaves_like
'an idempotent worker'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment