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
85f46cde
Commit
85f46cde
authored
Oct 04, 2021
by
Dmitriy Zaporozhets (DZ)
Committed by
Mayra Cabrera
Oct 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default value for integrated error tracking
parent
f8b652b9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
6 deletions
+23
-6
db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb
...923151641_change_default_for_integrated_error_tracking.rb
+11
-0
db/schema_migrations/20210923151641
db/schema_migrations/20210923151641
+1
-0
db/structure.sql
db/structure.sql
+1
-1
spec/factories/project_error_tracking_settings.rb
spec/factories/project_error_tracking_settings.rb
+1
-0
spec/features/projects/settings/monitor_settings_spec.rb
spec/features/projects/settings/monitor_settings_spec.rb
+5
-1
spec/services/projects/operations/update_service_spec.rb
spec/services/projects/operations/update_service_spec.rb
+4
-4
No files found.
db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb
0 → 100644
View file @
85f46cde
# frozen_string_literal: true
class
ChangeDefaultForIntegratedErrorTracking
<
Gitlab
::
Database
::
Migration
[
1.0
]
def
up
change_column_default
:project_error_tracking_settings
,
:integrated
,
from:
false
,
to:
true
end
def
down
change_column_default
:project_error_tracking_settings
,
:integrated
,
from:
true
,
to:
false
end
end
db/schema_migrations/20210923151641
0 → 100644
View file @
85f46cde
30c135ab62a57208160dd0949d6615f42af39117e25769d70a9658de5417b7e4
\ No newline at end of file
db/structure.sql
View file @
85f46cde
...
...
@@ -17829,7 +17829,7 @@ CREATE TABLE project_error_tracking_settings (
encrypted_token_iv character varying,
project_name character varying,
organization_name character varying,
integrated boolean DEFAULT
fals
e NOT NULL
integrated boolean DEFAULT
tru
e NOT NULL
);
CREATE TABLE project_export_jobs (
spec/factories/project_error_tracking_settings.rb
View file @
85f46cde
...
...
@@ -8,6 +8,7 @@ FactoryBot.define do
token
{
'access_token_123'
}
project_name
{
'Sentry Project'
}
organization_name
{
'Sentry Org'
}
integrated
{
false
}
trait
:disabled
do
enabled
{
false
}
...
...
spec/features/projects/settings/monitor_settings_spec.rb
View file @
85f46cde
...
...
@@ -97,7 +97,9 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do
within
'.js-error-tracking-settings'
do
click_button
(
'Expand'
)
choose
(
'cloud-hosted Sentry'
)
end
expect
(
page
).
to
have_content
(
'Sentry API URL'
)
expect
(
page
.
body
).
to
include
(
'Error Tracking'
)
expect
(
page
).
to
have_button
(
'Connect'
)
...
...
@@ -140,8 +142,10 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do
within
'.js-error-tracking-settings'
do
click_button
(
'Expand'
)
choose
(
'cloud-hosted Sentry'
)
check
(
'Active'
)
end
check
(
'Active'
)
fill_in
(
'error-tracking-api-host'
,
with:
'http://sentry.example.com'
)
fill_in
(
'error-tracking-token'
,
with:
'token'
)
...
...
spec/services/projects/operations/update_service_spec.rb
View file @
85f46cde
...
...
@@ -294,10 +294,10 @@ RSpec.describe Projects::Operations::UpdateService do
end
context
'without setting'
do
it
'
does not create a setting
'
do
expect
(
result
[
:status
]).
to
eq
(
:
error
)
expect
(
project
.
reload
.
error_tracking_setting
).
to
be_nil
it
'
creates setting with default values
'
do
expect
(
result
[
:status
]).
to
eq
(
:
success
)
expect
(
project
.
error_tracking_setting
.
enabled
).
to
be_truthy
expect
(
project
.
error_tracking_setting
.
integrated
).
to
be_truthy
end
end
end
...
...
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