Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
054c9f71bc
commit
faf60c19a9
|
@ -2,7 +2,12 @@
|
||||||
import { GlLoadingIcon } from '@gitlab/ui';
|
import { GlLoadingIcon } from '@gitlab/ui';
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { mapActions, mapGetters, mapState } from 'vuex';
|
import { mapActions, mapGetters, mapState } from 'vuex';
|
||||||
import { getParameterValues } from '~/lib/utils/url_utility';
|
import {
|
||||||
|
getParameterValues,
|
||||||
|
updateHistory,
|
||||||
|
setUrlParams,
|
||||||
|
removeParams,
|
||||||
|
} from '~/lib/utils/url_utility';
|
||||||
import EmptyState from './empty_state.vue';
|
import EmptyState from './empty_state.vue';
|
||||||
import TestSuiteTable from './test_suite_table.vue';
|
import TestSuiteTable from './test_suite_table.vue';
|
||||||
import TestSummary from './test_summary.vue';
|
import TestSummary from './test_summary.vue';
|
||||||
|
@ -49,12 +54,28 @@ export default {
|
||||||
]),
|
]),
|
||||||
summaryBackClick() {
|
summaryBackClick() {
|
||||||
this.removeSelectedSuiteIndex();
|
this.removeSelectedSuiteIndex();
|
||||||
|
|
||||||
|
updateHistory({
|
||||||
|
url: removeParams(['job_name']),
|
||||||
|
title: document.title,
|
||||||
|
replace: true,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
summaryTableRowClick(index) {
|
summaryTableRowClick(index) {
|
||||||
this.setSelectedSuiteIndex(index);
|
this.setSelectedSuiteIndex(index);
|
||||||
|
|
||||||
// Fetch the test suite when the user clicks to see more details
|
// Fetch the test suite when the user clicks to see more details
|
||||||
this.fetchTestSuite(index);
|
this.fetchTestSuite(index);
|
||||||
|
|
||||||
|
const urlParams = {
|
||||||
|
job_name: this.getSelectedSuite.name,
|
||||||
|
};
|
||||||
|
|
||||||
|
updateHistory({
|
||||||
|
url: setUrlParams(urlParams),
|
||||||
|
title: document.title,
|
||||||
|
replace: true,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
beforeEnterTransition() {
|
beforeEnterTransition() {
|
||||||
document.documentElement.style.overflowX = 'hidden';
|
document.documentElement.style.overflowX = 'hidden';
|
||||||
|
|
|
@ -352,7 +352,7 @@ export default {
|
||||||
</template>
|
</template>
|
||||||
</gl-sprintf>
|
</gl-sprintf>
|
||||||
</div>
|
</div>
|
||||||
<div class="flash-container timeline-content"></div>
|
<div class="flash-container"></div>
|
||||||
<form :data-line-code="lineCode" class="edit-note common-note-form js-quick-submit gfm-form">
|
<form :data-line-code="lineCode" class="edit-note common-note-form js-quick-submit gfm-form">
|
||||||
<comment-field-layout :noteable-data="getNoteableData" :is-internal-note="isInternalNote">
|
<comment-field-layout :noteable-data="getNoteableData" :is-internal-note="isInternalNote">
|
||||||
<markdown-editor
|
<markdown-editor
|
||||||
|
|
|
@ -96,14 +96,6 @@ $notification-box-shadow-color: rgba(0, 0, 0, 0.25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-down(sm) {
|
|
||||||
ul.notes {
|
|
||||||
.flash-container.timeline-content {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.gl-browser-ie .flash-container {
|
.gl-browser-ie .flash-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
max-width: $limited-layout-width;
|
max-width: $limited-layout-width;
|
||||||
|
|
|
@ -88,18 +88,18 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-content:not(.flash-container) {
|
.timeline-content {
|
||||||
margin-left: 2.5rem;
|
margin-left: 2.5rem;
|
||||||
border: 1px solid $border-color;
|
border: 1px solid $border-color;
|
||||||
border-radius: $gl-border-radius-base;
|
border-radius: $gl-border-radius-base;
|
||||||
padding: $gl-padding-4 $gl-padding-8;
|
padding: $gl-padding-4 $gl-padding-8;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.target) .timeline-content:not(.flash-container) {
|
&:not(.target) .timeline-content {
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.draft-note .timeline-content:not(.flash-container) {
|
&.draft-note .timeline-content {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-content:not(.flash-container) {
|
.timeline-content {
|
||||||
margin-left: 2.5rem;
|
margin-left: 2.5rem;
|
||||||
border-left: 1px solid $border-color;
|
border-left: 1px solid $border-color;
|
||||||
border-right: 1px solid $border-color;
|
border-right: 1px solid $border-color;
|
||||||
|
@ -138,11 +138,11 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.target) .timeline-content:not(.flash-container) {
|
&:not(.target) .timeline-content {
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.draft-note .timeline-content:not(.flash-container) {
|
&.draft-note .timeline-content {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
|
@ -154,7 +154,7 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
||||||
border-right: 1px solid $border-color;
|
border-right: 1px solid $border-color;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
|
|
||||||
.timeline-content:not(.flash-container) {
|
.timeline-content {
|
||||||
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 18px;
|
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1057,7 +1057,7 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
ul.notes li.note-wrapper {
|
ul.notes li.note-wrapper {
|
||||||
.timeline-content:not(.flash-container) {
|
.timeline-content {
|
||||||
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
|
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1106,7 +1106,7 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draft-note-component.draft-note.timeline-entry {
|
.draft-note-component.draft-note.timeline-entry {
|
||||||
.timeline-content:not(.flash-container) {
|
.timeline-content {
|
||||||
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
|
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ module Ci
|
||||||
def unlock_job_artifacts
|
def unlock_job_artifacts
|
||||||
start = Time.current
|
start = Time.current
|
||||||
|
|
||||||
pipeline.builds.each_batch(of: BATCH_SIZE) do |builds|
|
builds_relation.each_batch(of: BATCH_SIZE) do |builds|
|
||||||
# rubocop: disable CodeReuse/ActiveRecord
|
# rubocop: disable CodeReuse/ActiveRecord
|
||||||
Ci::JobArtifact.where(job_id: builds.pluck(:id)).each_batch(of: BATCH_SIZE) do |job_artifacts|
|
Ci::JobArtifact.where(job_id: builds.pluck(:id)).each_batch(of: BATCH_SIZE) do |job_artifacts|
|
||||||
unlocked_count = Ci::JobArtifact
|
unlocked_count = Ci::JobArtifact
|
||||||
|
@ -100,6 +100,16 @@ module Ci
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Removes the partition_id filter from the query until we get more data in the
|
||||||
|
# second partition.
|
||||||
|
def builds_relation
|
||||||
|
if Feature.enabled?(:disable_ci_partition_pruning, pipeline.project, type: :wip)
|
||||||
|
Ci::Build.in_pipelines(pipeline)
|
||||||
|
else
|
||||||
|
pipeline.builds
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def unlock_pipeline_artifacts
|
def unlock_pipeline_artifacts
|
||||||
@unlocked_pipeline_artifacts_count = pipeline.pipeline_artifacts.update_all(locked: :unlocked)
|
@unlocked_pipeline_artifacts_count = pipeline.pipeline_artifacts.update_all(locked: :unlocked)
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
.notes.notes-form.timeline
|
.notes.notes-form.timeline
|
||||||
.timeline-entry.note-form
|
.timeline-entry.note-form
|
||||||
.timeline-entry-inner
|
.timeline-entry-inner
|
||||||
.flash-container.timeline-content
|
.flash-container
|
||||||
|
|
||||||
.timeline-content.timeline-content-form
|
.timeline-content.timeline-content-form
|
||||||
= render "shared/notes/form", view: diff_view, supports_autocomplete: autocomplete
|
= render "shared/notes/form", view: diff_view, supports_autocomplete: autocomplete
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
name: disable_ci_partition_pruning
|
||||||
|
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/435737
|
||||||
|
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140355
|
||||||
|
rollout_issue_url:
|
||||||
|
milestone: '16.8'
|
||||||
|
group: group::pipeline execution
|
||||||
|
type: wip
|
||||||
|
default_enabled: false
|
|
@ -4,7 +4,7 @@ group: Source Code
|
||||||
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments"
|
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Git **(FREE ALL)**
|
# Use Git **(FREE ALL)**
|
||||||
|
|
||||||
Git is a [free and open source](https://git-scm.com/about/free-and-open-source)
|
Git is a [free and open source](https://git-scm.com/about/free-and-open-source)
|
||||||
distributed version control system. It handles projects of all sizes quickly and
|
distributed version control system. It handles projects of all sizes quickly and
|
||||||
|
|
|
@ -17,7 +17,7 @@ GitLab is creating AI-assisted features across our DevSecOps platform. These fea
|
||||||
| Helps you discover or recall Git commands when and where you need them. | [Git suggestions](https://gitlab.com/gitlab-org/gitlab/-/issues/409636) | **(ULTIMATE SAAS EXPERIMENT)** |
|
| Helps you discover or recall Git commands when and where you need them. | [Git suggestions](https://gitlab.com/gitlab-org/gitlab/-/issues/409636) | **(ULTIMATE SAAS EXPERIMENT)** |
|
||||||
| Assists with quickly getting everyone up to speed on lengthy conversations to help ensure you are all on the same page. | [Discussion summary](#summarize-issue-discussions-with-discussion-summary) | **(ULTIMATE SAAS EXPERIMENT)** |
|
| Assists with quickly getting everyone up to speed on lengthy conversations to help ensure you are all on the same page. | [Discussion summary](#summarize-issue-discussions-with-discussion-summary) | **(ULTIMATE SAAS EXPERIMENT)** |
|
||||||
| Generates issue descriptions. | [Issue description generation](#summarize-an-issue-with-issue-description-generation) | **(ULTIMATE SAAS EXPERIMENT)** |
|
| Generates issue descriptions. | [Issue description generation](#summarize-an-issue-with-issue-description-generation) | **(ULTIMATE SAAS EXPERIMENT)** |
|
||||||
| Helps you write code more efficiently by viewing code suggestions as you type. <br><br><i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=hCAyCTacdAQ) | [Code Suggestions](project/repository/code_suggestions/index.md) | For SaaS: **(FREE BETA)**<br><br> For self-managed: **(ULTIMATE BETA)** |
|
| Helps you write code more efficiently by viewing code suggestions as you type. <br><br><i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=hCAyCTacdAQ) | [Code Suggestions](project/repository/code_suggestions/index.md) | For SaaS: **(FREE BETA)**<br><br> For self-managed: **(PREMIUM BETA)** |
|
||||||
| Automates repetitive tasks and helps catch bugs early. | [Test generation](project/merge_requests/ai_in_merge_requests.md#generate-suggested-tests-in-merge-requests) | **(ULTIMATE SAAS EXPERIMENT)** |
|
| Automates repetitive tasks and helps catch bugs early. | [Test generation](project/merge_requests/ai_in_merge_requests.md#generate-suggested-tests-in-merge-requests) | **(ULTIMATE SAAS EXPERIMENT)** |
|
||||||
| Generates a description for the merge request based on the contents of the template. | [Merge request template population](project/merge_requests/ai_in_merge_requests.md#fill-in-merge-request-templates) | **(ULTIMATE SAAS EXPERIMENT)** |
|
| Generates a description for the merge request based on the contents of the template. | [Merge request template population](project/merge_requests/ai_in_merge_requests.md#fill-in-merge-request-templates) | **(ULTIMATE SAAS EXPERIMENT)** |
|
||||||
| Assists in creating faster and higher-quality reviews by automatically suggesting reviewers for your merge request. <br><br><i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=ivwZQgh4Rxw) | [Suggested Reviewers](project/merge_requests/reviews/index.md#gitlab-duo-suggested-reviewers) | **(ULTIMATE SAAS)** |
|
| Assists in creating faster and higher-quality reviews by automatically suggesting reviewers for your merge request. <br><br><i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=ivwZQgh4Rxw) | [Suggested Reviewers](project/merge_requests/reviews/index.md#gitlab-duo-suggested-reviewers) | **(ULTIMATE SAAS)** |
|
||||||
|
|
|
@ -54,31 +54,31 @@ For more information about our plans for language support in SAST, see the [cate
|
||||||
|
|
||||||
| Language / framework | [Analyzer](analyzers.md) used for scanning | Minimum supported GitLab version |
|
| Language / framework | [Analyzer](analyzers.md) used for scanning | Minimum supported GitLab version |
|
||||||
|------------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
|
|------------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
|
||||||
| .NET (all versions, C# only) | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 15.4 |
|
| .NET (all versions, C# only) | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 15.4 |
|
||||||
| Apex (Salesforce) | [PMD](https://gitlab.com/gitlab-org/security-products/analyzers/pmd-apex) | 12.1 |
|
| Apex (Salesforce) | [PMD](https://gitlab.com/gitlab-org/security-products/analyzers/pmd-apex) | 12.1 |
|
||||||
| C | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 14.2 |
|
| C | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 14.2 |
|
||||||
| C/C++ | [Flawfinder](https://gitlab.com/gitlab-org/security-products/analyzers/flawfinder) | 10.7 |
|
| C/C++ | [Flawfinder](https://gitlab.com/gitlab-org/security-products/analyzers/flawfinder) | 10.7 |
|
||||||
| Elixir (Phoenix) | [Sobelow](https://gitlab.com/gitlab-org/security-products/analyzers/sobelow) | 11.1 |
|
| Elixir (Phoenix) | [Sobelow](https://gitlab.com/gitlab-org/security-products/analyzers/sobelow) | 11.1 |
|
||||||
| Go | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 14.4 |
|
| Go | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 14.4 |
|
||||||
| Groovy<sup>1</sup> | [SpotBugs](https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs) with the find-sec-bugs plugin | 11.3 (Gradle) & 11.9 (Maven, SBT) |
|
| Groovy<sup>1</sup> | [SpotBugs](https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs) with the find-sec-bugs plugin | 11.3 (Gradle) & 11.9 (Maven, SBT) |
|
||||||
| Helm Charts | [Kubesec](https://gitlab.com/gitlab-org/security-products/analyzers/kubesec) | 13.1 |
|
| Helm Charts | [Kubesec](https://gitlab.com/gitlab-org/security-products/analyzers/kubesec) | 13.1 |
|
||||||
| Java (any build system) | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 14.10 |
|
| Java (any build system) | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 14.10 |
|
||||||
| Java (Android) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
| Java (Android) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
||||||
| JavaScript | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 13.10 |
|
| JavaScript | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 13.10 |
|
||||||
| Kotlin (Android) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
| Kotlin (Android) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
||||||
| Kotlin (General)<sup>1</sup> | [SpotBugs](https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs) with the find-sec-bugs plugin | 13.11 |
|
| Kotlin (General)<sup>1</sup> | [SpotBugs](https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs) with the find-sec-bugs plugin | 13.11 |
|
||||||
| Kubernetes manifests | [Kubesec](https://gitlab.com/gitlab-org/security-products/analyzers/kubesec) | 12.6 |
|
| Kubernetes manifests | [Kubesec](https://gitlab.com/gitlab-org/security-products/analyzers/kubesec) | 12.6 |
|
||||||
| Node.js | [NodeJsScan](https://gitlab.com/gitlab-org/security-products/analyzers/nodejs-scan) | 11.1 |
|
| Node.js | [NodeJsScan](https://gitlab.com/gitlab-org/security-products/analyzers/nodejs-scan) | 11.1 |
|
||||||
| Objective-C (iOS) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
| Objective-C (iOS) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
||||||
| PHP | [phpcs-security-audit](https://gitlab.com/gitlab-org/security-products/analyzers/phpcs-security-audit) | 10.8 |
|
| PHP | [phpcs-security-audit](https://gitlab.com/gitlab-org/security-products/analyzers/phpcs-security-audit) | 10.8 |
|
||||||
| Python | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 13.9 |
|
| Python | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 13.9 |
|
||||||
| React | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 13.10 |
|
| React | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 13.10 |
|
||||||
| Ruby | [brakeman](https://gitlab.com/gitlab-org/security-products/analyzers/brakeman) | 13.9 |
|
| Ruby | [brakeman](https://gitlab.com/gitlab-org/security-products/analyzers/brakeman) | 13.9 |
|
||||||
| Ruby on Rails | [brakeman](https://gitlab.com/gitlab-org/security-products/analyzers/brakeman) | 10.3 |
|
| Ruby on Rails | [brakeman](https://gitlab.com/gitlab-org/security-products/analyzers/brakeman) | 10.3 |
|
||||||
| Scala (any build system) | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 16.0 |
|
| Scala (any build system) | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 16.0 |
|
||||||
| Scala<sup>1</sup> | [SpotBugs](https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs) with the find-sec-bugs plugin | 11.0 (SBT) & 11.9 (Gradle, Maven) |
|
| Scala<sup>1</sup> | [SpotBugs](https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs) with the find-sec-bugs plugin | 11.0 (SBT) & 11.9 (Gradle, Maven) |
|
||||||
| Swift (iOS) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
| Swift (iOS) | [MobSF (beta)](https://gitlab.com/gitlab-org/security-products/analyzers/mobsf) | 13.5 |
|
||||||
| TypeScript | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/-/blob/main/RULES.md) | 13.10 |
|
| TypeScript | [Semgrep](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep) with [GitLab-managed rules](https://gitlab.com/gitlab-org/security-products/analyzers/semgrep/#sast-rules) | 13.10 |
|
||||||
|
|
||||||
1. The SpotBugs-based analyzer supports [Gradle](https://gradle.org/), [Maven](https://maven.apache.org/), and [SBT](https://www.scala-sbt.org/). It can also be used with variants like the
|
1. The SpotBugs-based analyzer supports [Gradle](https://gradle.org/), [Maven](https://maven.apache.org/), and [SBT](https://www.scala-sbt.org/). It can also be used with variants like the
|
||||||
[Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html),
|
[Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html),
|
||||||
|
|
|
@ -82,6 +82,7 @@ module Gitlab
|
||||||
def sli_query
|
def sli_query
|
||||||
{
|
{
|
||||||
gitlab_main: prometheus_alert_db_indicators_settings[sli_query_key][:main],
|
gitlab_main: prometheus_alert_db_indicators_settings[sli_query_key][:main],
|
||||||
|
gitlab_main_cell: prometheus_alert_db_indicators_settings[sli_query_key][:main_cell],
|
||||||
gitlab_ci: prometheus_alert_db_indicators_settings[sli_query_key][:ci]
|
gitlab_ci: prometheus_alert_db_indicators_settings[sli_query_key][:ci]
|
||||||
}.fetch(gitlab_schema)
|
}.fetch(gitlab_schema)
|
||||||
end
|
end
|
||||||
|
@ -90,6 +91,7 @@ module Gitlab
|
||||||
def slo
|
def slo
|
||||||
{
|
{
|
||||||
gitlab_main: prometheus_alert_db_indicators_settings[slo_key][:main],
|
gitlab_main: prometheus_alert_db_indicators_settings[slo_key][:main],
|
||||||
|
gitlab_main_cell: prometheus_alert_db_indicators_settings[slo_key][:main_cell],
|
||||||
gitlab_ci: prometheus_alert_db_indicators_settings[slo_key][:ci]
|
gitlab_ci: prometheus_alert_db_indicators_settings[slo_key][:ci]
|
||||||
}.fetch(gitlab_schema)
|
}.fetch(gitlab_schema)
|
||||||
end
|
end
|
||||||
|
|
|
@ -2066,6 +2066,9 @@ msgstr ""
|
||||||
msgid "AI|There is too much text in the chat. Please try again with a shorter text."
|
msgid "AI|There is too much text in the chat. Please try again with a shorter text."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "AI|This is an experiment feature that uses AI to provide recommendations for resolving this vulnerability. Use this feature with caution."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "AI|To help improve the quality of the content, send your feedback to GitLab team members."
|
msgid "AI|To help improve the quality of the content, send your feedback to GitLab team members."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -52258,6 +52261,9 @@ msgstr ""
|
||||||
msgid "UsageQuota|%{storage_limit_link_start}A namespace storage limit%{link_end} of %{limit} will soon be enforced for the %{strong_start}%{namespace_name}%{strong_end} namespace. %{extra_message}"
|
msgid "UsageQuota|%{storage_limit_link_start}A namespace storage limit%{link_end} of %{limit} will soon be enforced for the %{strong_start}%{namespace_name}%{strong_end} namespace. %{extra_message}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "UsageQuota|An error occured while loading the storage usage details. Please refresh the page to try again."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|Any additional purchased storage will be displayed here."
|
msgid "UsageQuota|Any additional purchased storage will be displayed here."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -52396,9 +52402,6 @@ msgstr ""
|
||||||
msgid "UsageQuota|Something went wrong while fetching project storage statistics"
|
msgid "UsageQuota|Something went wrong while fetching project storage statistics"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|Something went wrong while loading usage details"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "UsageQuota|Storage"
|
msgid "UsageQuota|Storage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ RSpec.describe "Admin::AbuseReports", :js, feature_category: :insider_threat do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit admin_abuse_reports_path
|
visit admin_abuse_reports_path
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'create new appearance' do
|
it 'create new appearance' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
|
|
||||||
fill_in 'appearance_title', with: 'MyCompany'
|
fill_in 'appearance_title', with: 'MyCompany'
|
||||||
|
@ -39,7 +39,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'preview sign-in page appearance' do
|
it 'preview sign-in page appearance' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
click_link "Sign-in page"
|
click_link "Sign-in page"
|
||||||
|
@ -53,7 +53,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'preview new project page appearance', :js do
|
it 'preview new project page appearance', :js do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
click_link "New project page"
|
click_link "New project page"
|
||||||
|
@ -64,7 +64,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
context 'Custom system header and footer' do
|
context 'Custom system header and footer' do
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when system header and footer messages are empty' do
|
context 'when system header and footer messages are empty' do
|
||||||
|
@ -102,7 +102,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'custom new project page', :js do
|
it 'custom new project page', :js do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit new_project_path
|
visit new_project_path
|
||||||
click_link 'Create blank project'
|
click_link 'Create blank project'
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
context 'Profile page with custom profile image guidelines' do
|
context 'Profile page with custom profile image guidelines' do
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
fill_in 'appearance_profile_image_guidelines', with: 'Custom profile image guidelines, please :smile:!'
|
fill_in 'appearance_profile_image_guidelines', with: 'Custom profile image guidelines, please :smile:!'
|
||||||
click_button 'Update appearance settings'
|
click_button 'Update appearance settings'
|
||||||
|
@ -128,7 +128,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'appearance logo' do
|
it 'appearance logo' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
|
|
||||||
attach_file(:appearance_logo, logo_fixture)
|
attach_file(:appearance_logo, logo_fixture)
|
||||||
|
@ -141,7 +141,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'appearance pwa icon' do
|
it 'appearance pwa icon' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
|
|
||||||
attach_file(:appearance_pwa_icon, logo_fixture)
|
attach_file(:appearance_pwa_icon, logo_fixture)
|
||||||
|
@ -154,7 +154,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'header logos' do
|
it 'header logos' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
|
|
||||||
attach_file(:appearance_header_logo, logo_fixture)
|
attach_file(:appearance_header_logo, logo_fixture)
|
||||||
|
@ -167,7 +167,7 @@ RSpec.describe 'Admin Appearance', feature_category: :shared do
|
||||||
|
|
||||||
it 'Favicon' do
|
it 'Favicon' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit admin_application_settings_appearances_path
|
visit admin_application_settings_appearances_path
|
||||||
|
|
||||||
attach_file(:appearance_favicon, logo_fixture)
|
attach_file(:appearance_favicon, logo_fixture)
|
||||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'Admin browse spam logs', feature_category: :shared do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'browse spam logs' do
|
it 'browse spam logs' do
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe 'admin deploy keys', :js, feature_category: :system_access do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'show all public deploy keys' do
|
it 'show all public deploy keys' do
|
||||||
|
|
|
@ -6,7 +6,7 @@ RSpec.describe 'DevOps Report page', :js, feature_category: :devops_reports do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'without licensed feature devops adoption' do
|
context 'without licensed feature devops adoption' do
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe 'Admin disables Git access protocol', :js, feature_category: :sou
|
||||||
before do
|
before do
|
||||||
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with HTTP disabled' do
|
context 'with HTTP disabled' do
|
||||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'Admin disables 2FA for a user', feature_category: :system_access
|
||||||
it 'successfully', :js do
|
it 'successfully', :js do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
user = create(:user, :two_factor)
|
user = create(:user, :two_factor)
|
||||||
|
|
||||||
edit_user(user)
|
edit_user(user)
|
||||||
|
@ -27,7 +27,7 @@ RSpec.describe 'Admin disables 2FA for a user', feature_category: :system_access
|
||||||
it 'for a user without 2FA enabled' do
|
it 'for a user without 2FA enabled' do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
user = create(:user)
|
user = create(:user)
|
||||||
|
|
||||||
edit_user(user)
|
edit_user(user)
|
||||||
|
|
|
@ -15,7 +15,7 @@ RSpec.describe 'Admin Groups', feature_category: :groups_and_projects do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
stub_application_setting(default_group_visibility: internal)
|
stub_application_setting(default_group_visibility: internal)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ RSpec.describe "Admin Health Check", :js, feature_category: :error_budgets do
|
||||||
before do
|
before do
|
||||||
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#show' do
|
describe '#show' do
|
||||||
|
|
|
@ -9,7 +9,7 @@ RSpec.describe 'Admin::HookLogs', feature_category: :webhooks do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'show list of hook logs' do
|
it 'show list of hook logs' do
|
||||||
|
|
|
@ -9,7 +9,7 @@ RSpec.describe 'Admin::Hooks', feature_category: :webhooks do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET /admin/hooks' do
|
describe 'GET /admin/hooks' do
|
||||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'Admin Jobs', :js, feature_category: :continuous_integration do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET /admin/jobs' do
|
describe 'GET /admin/jobs' do
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'admin issues labels', feature_category: :team_planning do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'list' do
|
describe 'list' do
|
||||||
|
|
|
@ -10,7 +10,7 @@ RSpec.describe 'admin manage applications', feature_category: :system_access do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
include_examples 'manage applications'
|
include_examples 'manage applications'
|
||||||
|
|
|
@ -24,7 +24,7 @@ RSpec.describe 'Admin Mode Login', feature_category: :system_access do
|
||||||
|
|
||||||
repeated_otp = user.current_otp
|
repeated_otp = user.current_otp
|
||||||
enter_code(repeated_otp)
|
enter_code(repeated_otp)
|
||||||
enable_admin_mode!(user, use_ui: true)
|
gitlab_enable_admin_mode_sign_in(user, use_mock_admin_mode: false)
|
||||||
|
|
||||||
expect(page).to have_content(_('Enter verification code'))
|
expect(page).to have_content(_('Enter verification code'))
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ RSpec.describe 'Admin Mode Login', feature_category: :system_access do
|
||||||
expect(page).to have_content('Enter verification code')
|
expect(page).to have_content('Enter verification code')
|
||||||
|
|
||||||
enter_code(user.current_otp)
|
enter_code(user.current_otp)
|
||||||
enable_admin_mode!(user, use_ui: true)
|
gitlab_enable_admin_mode_sign_in(user, use_mock_admin_mode: false)
|
||||||
|
|
||||||
expect(page).to have_content(_('Enter verification code'))
|
expect(page).to have_content(_('Enter verification code'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe 'Admin Mode Logout', :js, feature_category: :system_access do
|
||||||
# TODO: This used to use gitlab_sign_in, instead of sign_in, but that is buggy. See
|
# TODO: This used to use gitlab_sign_in, instead of sign_in, but that is buggy. See
|
||||||
# this issue to look into why: https://gitlab.com/gitlab-org/gitlab/-/issues/331851
|
# this issue to look into why: https://gitlab.com/gitlab-org/gitlab/-/issues/331851
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
enable_admin_mode!(user, use_ui: true)
|
gitlab_enable_admin_mode_sign_in(user, use_mock_admin_mode: false)
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ RSpec.describe 'Admin mode for workers', :request_store, feature_category: :syst
|
||||||
|
|
||||||
context 'when admin mode enabled', :delete do
|
context 'when admin mode enabled', :delete do
|
||||||
before do
|
before do
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can delete user', :js do
|
it 'can delete user', :js do
|
||||||
|
@ -67,6 +67,6 @@ RSpec.describe 'Admin mode for workers', :request_store, feature_category: :syst
|
||||||
Sidekiq::Worker.drain_all
|
Sidekiq::Worker.drain_all
|
||||||
|
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -69,7 +69,7 @@ RSpec.describe 'Admin mode', :js, feature_category: :shared do
|
||||||
|
|
||||||
context 'when in admin_mode' do
|
context 'when in admin_mode' do
|
||||||
before do
|
before do
|
||||||
enable_admin_mode!(admin, use_ui: true)
|
gitlab_enable_admin_mode_sign_in(admin, use_mock_admin_mode: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains link to leave admin mode' do
|
it 'contains link to leave admin mode' do
|
||||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe "Admin::Projects", feature_category: :groups_and_projects do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when membership is set to expire', :js do
|
describe 'when membership is set to expire', :js do
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "Admin Runners page", :js do
|
describe "Admin Runners page", :js do
|
||||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'Admin searches application settings', :js, feature_category: :gl
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'in appearances page' do
|
context 'in appearances page' do
|
||||||
|
|
|
@ -18,7 +18,7 @@ RSpec.describe "Admin > Admin sees background migrations", feature_category: :da
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can navigate to background migrations', :js do
|
it 'can navigate to background migrations', :js do
|
||||||
|
|
|
@ -7,7 +7,7 @@ RSpec.describe "Admin > Admin sees project statistics", feature_category: :group
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
|
|
||||||
visit admin_project_path(project)
|
visit admin_project_path(project)
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ RSpec.describe "Admin > Admin sees projects statistics", feature_category: :grou
|
||||||
create(:project, :repository) { |project| project.statistics.destroy! }
|
create(:project, :repository) { |project| project.statistics.destroy! }
|
||||||
|
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
|
|
||||||
visit admin_projects_path
|
visit admin_projects_path
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,7 +13,7 @@ RSpec.describe 'Admin updates settings', feature_category: :shared do
|
||||||
before do
|
before do
|
||||||
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin, use_ui: true)
|
gitlab_enable_admin_mode_sign_in(admin, use_mock_admin_mode: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'General page' do
|
context 'General page' do
|
||||||
|
|
|
@ -6,7 +6,7 @@ RSpec.describe 'Admin System Info', feature_category: :shared do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET /admin/system_info' do
|
describe 'GET /admin/system_info' do
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'Admin > Users > Impersonation Tokens', :js, feature_category: :s
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "token creation" do
|
describe "token creation" do
|
||||||
|
|
|
@ -7,7 +7,7 @@ RSpec.describe "Admin::Users", feature_category: :user_management do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'Tabs' do
|
describe 'Tabs' do
|
||||||
|
|
|
@ -25,7 +25,7 @@ RSpec.describe 'Admin uses repository checks', :request_store, feature_category:
|
||||||
|
|
||||||
context 'when admin mode is enabled' do
|
context 'when admin mode is enabled' do
|
||||||
before do
|
before do
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'to trigger a single check', :js do
|
it 'to trigger a single check', :js do
|
||||||
|
|
|
@ -7,7 +7,7 @@ RSpec.describe 'Admin Broadcast Messages', :js, feature_category: :onboarding do
|
||||||
it 'previews, creates and edits a broadcast message' do
|
it 'previews, creates and edits a broadcast message' do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
# create
|
# create
|
||||||
visit admin_broadcast_messages_path
|
visit admin_broadcast_messages_path
|
||||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe 'admin visits dashboard' do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'counting forks', :js, feature_category: :source_code_management do
|
context 'counting forks', :js, feature_category: :source_code_management do
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'Admin::Users::User', feature_category: :user_management do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user, use_ui: true)
|
gitlab_enable_admin_mode_sign_in(current_user, use_mock_admin_mode: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET /admin/users/:id' do
|
describe 'GET /admin/users/:id' do
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe 'Admin::Users', feature_category: :user_management do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET /admin/users', :js do
|
describe 'GET /admin/users', :js do
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'Instance variables', :js, feature_category: :secrets_management
|
||||||
before do
|
before do
|
||||||
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit page_path
|
visit page_path
|
||||||
wait_for_requests
|
wait_for_requests
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'Issue Boards shortcut', :js, feature_category: :team_planning do
|
||||||
|
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit project_path(project)
|
visit project_path(project)
|
||||||
end
|
end
|
||||||
|
@ -30,7 +30,7 @@ RSpec.describe 'Issue Boards shortcut', :js, feature_category: :team_planning do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit project_path(project)
|
visit project_path(project)
|
||||||
end
|
end
|
||||||
|
|
|
@ -121,7 +121,7 @@ RSpec.describe 'Broadcast Messages', feature_category: :onboarding do
|
||||||
stub_const('Gitlab::Cache::JsonCaches::JsonKeyed::STRATEGY_KEY_COMPONENTS', original_strategy_value)
|
stub_const('Gitlab::Cache::JsonCaches::JsonKeyed::STRATEGY_KEY_COMPONENTS', original_strategy_value)
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit admin_broadcast_messages_path
|
visit admin_broadcast_messages_path
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ RSpec.describe 'Clusterable > Show page', feature_category: :deployment_manageme
|
||||||
let(:cluster) { create(:cluster, :provided_by_gcp, :instance) }
|
let(:cluster) { create(:cluster, :provided_by_gcp, :instance) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
enable_admin_mode!(current_user)
|
gitlab_enable_admin_mode_sign_in(current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'show page' do
|
it_behaves_like 'show page' do
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe 'Expand and collapse diffs', :js, feature_category: :source_code_
|
||||||
allow(Gitlab::CurrentSettings).to receive(:diff_max_patch_bytes).and_return(100.kilobytes)
|
allow(Gitlab::CurrentSettings).to receive(:diff_max_patch_bytes).and_return(100.kilobytes)
|
||||||
|
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
wait_for_requests
|
wait_for_requests
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe "Gitlab::Experiment", :js, feature_category: :activation do
|
||||||
before do
|
before do
|
||||||
admin = create(:admin)
|
admin = create(:admin)
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
stub_experiments(null_hypothesis: :candidate)
|
stub_experiments(null_hypothesis: :candidate)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ RSpec.describe 'User Cluster', :js, feature_category: :environment_management do
|
||||||
gitlab_sign_out
|
gitlab_sign_out
|
||||||
|
|
||||||
gitlab_sign_in(admin)
|
gitlab_sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit group_clusters_path(group)
|
visit group_clusters_path(group)
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,7 +66,7 @@ RSpec.describe 'Groups > Members > List members', :js, feature_category: :groups
|
||||||
|
|
||||||
it 'shows 2FA badge to admins' do
|
it 'shows 2FA badge to admins' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit group_group_members_path(group)
|
visit group_group_members_path(group)
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ RSpec.describe "Help Dropdown", :js, feature_category: :shared do
|
||||||
context "when severity is #{severity}" do
|
context "when severity is #{severity}" do
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
allow_next_instance_of(VersionCheck) do |instance|
|
allow_next_instance_of(VersionCheck) do |instance|
|
||||||
allow(instance).to receive(:response).and_return({ "severity" => severity })
|
allow(instance).to receive(:response).and_return({ "severity" => severity })
|
||||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe 'Admin views hidden merge requests', feature_category: :insider_t
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
visit(project_merge_requests_path(project))
|
visit(project_merge_requests_path(project))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ RSpec.describe 'Gcp Cluster', :js, feature_category: :deployment_management do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
visit general_admin_application_settings_path
|
visit general_admin_application_settings_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ RSpec.describe 'User Cluster', :js, feature_category: :deployment_management do
|
||||||
gitlab_sign_out
|
gitlab_sign_out
|
||||||
|
|
||||||
gitlab_sign_in(admin)
|
gitlab_sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit project_clusters_path(project)
|
visit project_clusters_path(project)
|
||||||
end
|
end
|
||||||
|
|
|
@ -153,7 +153,7 @@ RSpec.describe 'Edit Project Settings', feature_category: :groups_and_projects d
|
||||||
before do
|
before do
|
||||||
non_member.update_attribute(:admin, true)
|
non_member.update_attribute(:admin, true)
|
||||||
sign_in(non_member)
|
sign_in(non_member)
|
||||||
enable_admin_mode!(non_member)
|
gitlab_enable_admin_mode_sign_in(non_member)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders 404 if feature is disabled' do
|
it 'renders 404 if feature is disabled' do
|
||||||
|
|
|
@ -265,7 +265,7 @@ RSpec.describe 'Projects > Members > Manage members', :js, feature_category: :on
|
||||||
|
|
||||||
it 'shows 2FA badge to admins' do
|
it 'shows 2FA badge to admins' do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit_members_page
|
visit_members_page
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ RSpec.describe 'User views an empty project', feature_category: :groups_and_proj
|
||||||
context 'when admin mode is enabled' do
|
context 'when admin mode is enabled' do
|
||||||
before do
|
before do
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'allowing push to default branch'
|
it_behaves_like 'allowing push to default branch'
|
||||||
|
|
|
@ -82,7 +82,7 @@ RSpec.describe 'Protected Branches', :js, feature_category: :source_code_managem
|
||||||
context 'logged in as admin' do
|
context 'logged in as admin' do
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "explicit protected branches" do
|
describe "explicit protected branches" do
|
||||||
|
|
|
@ -19,7 +19,7 @@ RSpec.describe 'Usage stats consent', feature_category: :service_ping do
|
||||||
end
|
end
|
||||||
|
|
||||||
gitlab_sign_in(user)
|
gitlab_sign_in(user)
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'dismissible banner' do |button_text|
|
shared_examples 'dismissible banner' do |button_text|
|
||||||
|
|
|
@ -47,7 +47,7 @@ RSpec.describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state, fe
|
||||||
)
|
)
|
||||||
|
|
||||||
gitlab_sign_in(admin)
|
gitlab_sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
|
|
||||||
visit admin_user_path(user)
|
visit admin_user_path(user)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,12 @@ import Vue from 'vue';
|
||||||
import Vuex from 'vuex';
|
import Vuex from 'vuex';
|
||||||
import testReports from 'test_fixtures/pipelines/test_report.json';
|
import testReports from 'test_fixtures/pipelines/test_report.json';
|
||||||
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
|
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
|
||||||
import { getParameterValues } from '~/lib/utils/url_utility';
|
import {
|
||||||
|
getParameterValues,
|
||||||
|
updateHistory,
|
||||||
|
removeParams,
|
||||||
|
setUrlParams,
|
||||||
|
} from '~/lib/utils/url_utility';
|
||||||
import EmptyState from '~/ci/pipeline_details/test_reports/empty_state.vue';
|
import EmptyState from '~/ci/pipeline_details/test_reports/empty_state.vue';
|
||||||
import TestReports from '~/ci/pipeline_details/test_reports/test_reports.vue';
|
import TestReports from '~/ci/pipeline_details/test_reports/test_reports.vue';
|
||||||
import TestSummary from '~/ci/pipeline_details/test_reports/test_summary.vue';
|
import TestSummary from '~/ci/pipeline_details/test_reports/test_summary.vue';
|
||||||
|
@ -17,6 +22,9 @@ Vue.use(Vuex);
|
||||||
jest.mock('~/lib/utils/url_utility', () => ({
|
jest.mock('~/lib/utils/url_utility', () => ({
|
||||||
...jest.requireActual('~/lib/utils/url_utility'),
|
...jest.requireActual('~/lib/utils/url_utility'),
|
||||||
getParameterValues: jest.fn().mockReturnValue([]),
|
getParameterValues: jest.fn().mockReturnValue([]),
|
||||||
|
updateHistory: jest.fn().mockName('updateHistory'),
|
||||||
|
removeParams: jest.fn().mockName('removeParams'),
|
||||||
|
setUrlParams: jest.fn().mockName('setUrlParams'),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('Test reports app', () => {
|
describe('Test reports app', () => {
|
||||||
|
@ -128,9 +136,11 @@ describe('Test reports app', () => {
|
||||||
testSummaryTable().vm.$emit('row-click', 0);
|
testSummaryTable().vm.$emit('row-click', 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call setSelectedSuiteIndex and fetchTestSuite', () => {
|
it('should call setSelectedSuiteIndex, fetchTestSuite and updateHistory', () => {
|
||||||
expect(actionSpies.setSelectedSuiteIndex).toHaveBeenCalled();
|
expect(actionSpies.setSelectedSuiteIndex).toHaveBeenCalled();
|
||||||
expect(actionSpies.fetchTestSuite).toHaveBeenCalled();
|
expect(actionSpies.fetchTestSuite).toHaveBeenCalled();
|
||||||
|
expect(setUrlParams).toHaveBeenCalledWith({ job_name: undefined });
|
||||||
|
expect(updateHistory).toHaveBeenCalledWith({ replace: true, title: '', url: undefined });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -140,8 +150,10 @@ describe('Test reports app', () => {
|
||||||
testSummary().vm.$emit('on-back-click');
|
testSummary().vm.$emit('on-back-click');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call removeSelectedSuiteIndex', () => {
|
it('should call removeSelectedSuiteIndex and updateHistory', () => {
|
||||||
expect(actionSpies.removeSelectedSuiteIndex).toHaveBeenCalled();
|
expect(actionSpies.removeSelectedSuiteIndex).toHaveBeenCalled();
|
||||||
|
expect(removeParams).toHaveBeenCalledWith(['job_name']);
|
||||||
|
expect(updateHistory).toHaveBeenCalledWith({ replace: true, title: '', url: undefined });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,6 +39,28 @@ RSpec.describe Ci::UnlockPipelineService, :unlock_pipelines, :clean_gitlab_redis
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when disable_ci_partition_pruning is disabled' do
|
||||||
|
before do
|
||||||
|
stub_feature_flags(disable_ci_partition_pruning: false)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'unlocks the pipeline and all its artifacts' do
|
||||||
|
expect { execute }
|
||||||
|
.to change { pipeline.reload.locked }.from('artifacts_locked').to('unlocked')
|
||||||
|
.and change { pipeline.reload.job_artifacts.all?(&:artifact_unlocked?) }.to(true)
|
||||||
|
.and change { pipeline.reload.pipeline_artifacts.all?(&:artifact_unlocked?) }.to(true)
|
||||||
|
|
||||||
|
expect(execute).to eq(
|
||||||
|
status: :success,
|
||||||
|
skipped_already_leased: false,
|
||||||
|
skipped_already_unlocked: false,
|
||||||
|
exec_timeout: false,
|
||||||
|
unlocked_job_artifacts: pipeline.job_artifacts.count,
|
||||||
|
unlocked_pipeline_artifacts: pipeline.pipeline_artifacts.count
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'and pipeline is already unlocked' do
|
context 'and pipeline is already unlocked' do
|
||||||
before do
|
before do
|
||||||
described_class.new(pipeline).execute
|
described_class.new(pipeline).execute
|
||||||
|
|
|
@ -5,24 +5,12 @@
|
||||||
module AdminModeHelper
|
module AdminModeHelper
|
||||||
# Administrators are logged in by default in user mode and have to switch to admin
|
# Administrators are logged in by default in user mode and have to switch to admin
|
||||||
# mode for accessing any administrative functionality. This helper lets a user
|
# mode for accessing any administrative functionality. This helper lets a user
|
||||||
# access the admin area in two different ways:
|
# be in admin mode without requiring a second authentication step (provided
|
||||||
#
|
# the user is an admin)
|
||||||
# * Fast (use_ui: false) and suitable form the most use cases: fakes calls and grants
|
|
||||||
# access to the admin area without requiring a second authentication step (provided the
|
|
||||||
# user is an admin)
|
|
||||||
# * Slow (use_ui: true): visits the admin UI and enters the users password. A second
|
|
||||||
# authentication step may be needed.
|
|
||||||
#
|
#
|
||||||
# See also tag :enable_admin_mode in spec/spec_helper.rb for a spec-wide
|
# See also tag :enable_admin_mode in spec/spec_helper.rb for a spec-wide
|
||||||
# alternative
|
# alternative
|
||||||
def enable_admin_mode!(user, use_ui: false)
|
def enable_admin_mode!(user)
|
||||||
if use_ui
|
|
||||||
visit new_admin_session_path
|
|
||||||
fill_in 'user_password', with: user.password
|
|
||||||
click_button 'Enter admin mode'
|
|
||||||
|
|
||||||
wait_for_requests
|
|
||||||
else
|
|
||||||
fake_user_mode = instance_double(Gitlab::Auth::CurrentUserMode)
|
fake_user_mode = instance_double(Gitlab::Auth::CurrentUserMode)
|
||||||
|
|
||||||
allow(Gitlab::Auth::CurrentUserMode).to receive(:new).and_call_original
|
allow(Gitlab::Auth::CurrentUserMode).to receive(:new).and_call_original
|
||||||
|
@ -31,4 +19,3 @@ module AdminModeHelper
|
||||||
allow(fake_user_mode).to receive(:admin_mode?).and_return(user&.admin?)
|
allow(fake_user_mode).to receive(:admin_mode?).and_return(user&.admin?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
|
@ -49,6 +49,18 @@ module LoginHelpers
|
||||||
@current_user = user
|
@current_user = user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def gitlab_enable_admin_mode_sign_in(user, use_mock_admin_mode: true)
|
||||||
|
if use_mock_admin_mode
|
||||||
|
enable_admin_mode!(user)
|
||||||
|
else
|
||||||
|
visit new_admin_session_path
|
||||||
|
fill_in 'user_password', with: user.password
|
||||||
|
click_button 'Enter admin mode'
|
||||||
|
|
||||||
|
wait_for_requests
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def gitlab_sign_in_via(provider, user, uid, saml_response = nil)
|
def gitlab_sign_in_via(provider, user, uid, saml_response = nil)
|
||||||
mock_auth_hash_with_saml_xml(provider, uid, user.email, saml_response)
|
mock_auth_hash_with_saml_xml(provider, uid, user.email, saml_response)
|
||||||
visit new_user_session_path
|
visit new_user_session_path
|
||||||
|
|
|
@ -7,7 +7,7 @@ RSpec.shared_context 'instance integration activation' do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
enable_admin_mode!(user)
|
gitlab_enable_admin_mode_sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def visit_instance_integrations
|
def visit_instance_integrations
|
||||||
|
|
|
@ -9,7 +9,7 @@ RSpec.shared_examples 'inviting groups search results' do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
enable_admin_mode!(admin)
|
gitlab_enable_admin_mode_sign_in(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'shows groups where the admin has no direct membership' do
|
it 'shows groups where the admin has no direct membership' do
|
||||||
|
|
Loading…
Reference in New Issue