Bugfix `@service` being nil in integrations views
What does this MR do?
This fixes an error when users view any instance or group-level integrations that have a @service
variable in their view templates.
We renamed a variable @service
to @integration
in 5fd1c950 in IntegrationsActions
(a concern used by instance and group-level integrations controllers). We need to continue to support that variable as it is referred to in shared views that instance and group-level integrations use, such as app/views/projects/services/mattermost_slash_commands/_help.html.haml
.
This fix applies the same approach as in the original commit to continue to support this variable for project-level integrations. Removing the need for supporting @service
will be addressed in #329759 (closed).
It also adds a basic framework for group and instance-level integration tests with an initial test of the Mattermost Slash Command integration (one of the integrations that broke). A follow-up issue will address the remaining holes in our test suite #331325 (closed).
Issue: #331262 (closed)
Before merging
We should apply the Pick into 13.12 label when this MR is ready to be merged to master
!62054 (comment 578960963).
QA steps
- Go to
Admin -> Settings -> Integrations
- Click on
Mattermost slash commands
- The integration should render fine. Previously this caused a
500
error:undefined method project_level? for nil:NilClass
Does this MR meet the acceptance criteria?
Conformity
-
I have included a changelog entry, or it's not needed. (Does this MR need a changelog?) - [-] I have added/updated documentation, or it's not needed. (Is documentation required?)
- [-] I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?)
- [-] I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?)
-
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) - [-] I have tested this MR in all supported browsers, or it's not needed.
- [-] I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Related to #331262 (closed)