Commit 587794b4 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent e0bd3a45
...@@ -355,7 +355,7 @@ group :development, :test do ...@@ -355,7 +355,7 @@ group :development, :test do
gem 'fuubar', '~> 2.2.0' gem 'fuubar', '~> 2.2.0'
gem 'database_cleaner', '~> 1.7.0' gem 'database_cleaner', '~> 1.7.0'
gem 'factory_bot_rails', '~> 4.8.2' gem 'factory_bot_rails', '~> 5.1.0'
gem 'rspec-rails', '~> 3.8.0' gem 'rspec-rails', '~> 3.8.0'
gem 'rspec-retry', '~> 0.6.1' gem 'rspec-retry', '~> 0.6.1'
gem 'rspec_profiling', '~> 0.0.5' gem 'rspec_profiling', '~> 0.0.5'
......
...@@ -254,7 +254,7 @@ GEM ...@@ -254,7 +254,7 @@ GEM
mail (~> 2.7) mail (~> 2.7)
encryptor (3.0.0) encryptor (3.0.0)
equalizer (0.0.11) equalizer (0.0.11)
erubi (1.8.0) erubi (1.9.0)
escape_utils (1.2.1) escape_utils (1.2.1)
et-orbi (1.2.1) et-orbi (1.2.1)
tzinfo tzinfo
...@@ -264,11 +264,11 @@ GEM ...@@ -264,11 +264,11 @@ GEM
expression_parser (0.9.0) expression_parser (0.9.0)
extended-markdown-filter (0.6.0) extended-markdown-filter (0.6.0)
html-pipeline (~> 2.0) html-pipeline (~> 2.0)
factory_bot (4.8.2) factory_bot (5.1.0)
activesupport (>= 3.0.0) activesupport (>= 4.2.0)
factory_bot_rails (4.8.2) factory_bot_rails (5.1.0)
factory_bot (~> 4.8.2) factory_bot (~> 5.1.0)
railties (>= 3.0.0) railties (>= 4.2.0)
faraday (0.12.2) faraday (0.12.2)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
faraday-http-cache (2.0.0) faraday-http-cache (2.0.0)
...@@ -565,7 +565,7 @@ GEM ...@@ -565,7 +565,7 @@ GEM
activesupport (>= 4) activesupport (>= 4)
railties (>= 4) railties (>= 4)
request_store (~> 1.0) request_store (~> 1.0)
loofah (2.2.3) loofah (2.3.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
...@@ -783,7 +783,7 @@ GEM ...@@ -783,7 +783,7 @@ GEM
thor (>= 0.19.0, < 2.0) thor (>= 0.19.0, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
raindrops (0.19.0) raindrops (0.19.0)
rake (12.3.2) rake (12.3.3)
rb-fsevent (0.10.2) rb-fsevent (0.10.2)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
...@@ -1144,7 +1144,7 @@ DEPENDENCIES ...@@ -1144,7 +1144,7 @@ DEPENDENCIES
email_reply_trimmer (~> 0.1) email_reply_trimmer (~> 0.1)
email_spec (~> 2.2.0) email_spec (~> 2.2.0)
escape_utils (~> 1.1) escape_utils (~> 1.1)
factory_bot_rails (~> 4.8.2) factory_bot_rails (~> 5.1.0)
faraday (~> 0.12) faraday (~> 0.12)
faraday_middleware-aws-signers-v4 faraday_middleware-aws-signers-v4
fast_blank fast_blank
......
...@@ -40,13 +40,17 @@ const createFlashEl = (message, type) => ` ...@@ -40,13 +40,17 @@ const createFlashEl = (message, type) => `
<div class="flash-content flash-${type} rounded"> <div class="flash-content flash-${type} rounded">
<div class="flash-text"> <div class="flash-text">
${_.escape(message)} ${_.escape(message)}
${spriteIcon('close', 'close-icon')} <div class="close-icon-wrapper js-close-icon">
${spriteIcon('close', 'close-icon')}
</div>
</div> </div>
</div> </div>
`; `;
const removeFlashClickListener = (flashEl, fadeTransition) => { const removeFlashClickListener = (flashEl, fadeTransition) => {
flashEl.addEventListener('click', () => hideFlash(flashEl, fadeTransition)); flashEl
.querySelector('.js-close-icon')
.addEventListener('click', () => hideFlash(flashEl, fadeTransition));
}; };
/* /*
...@@ -78,7 +82,6 @@ const createFlash = function createFlash( ...@@ -78,7 +82,6 @@ const createFlash = function createFlash(
flashContainer.innerHTML = createFlashEl(message, type); flashContainer.innerHTML = createFlashEl(message, type);
const flashEl = flashContainer.querySelector(`.flash-${type}`); const flashEl = flashContainer.querySelector(`.flash-${type}`);
removeFlashClickListener(flashEl, fadeTransition);
if (actionConfig) { if (actionConfig) {
flashEl.innerHTML += createAction(actionConfig); flashEl.innerHTML += createAction(actionConfig);
...@@ -90,6 +93,8 @@ const createFlash = function createFlash( ...@@ -90,6 +93,8 @@ const createFlash = function createFlash(
} }
} }
removeFlashClickListener(flashEl, fadeTransition);
flashContainer.style.display = 'block'; flashContainer.style.display = 'block';
if (addBodyClass) document.body.classList.add('flash-shown'); if (addBodyClass) document.body.classList.add('flash-shown');
......
$notification-box-shadow-color: rgba(0, 0, 0, 0.25); $notification-box-shadow-color: rgba(0, 0, 0, 0.25);
.flash-container { .flash-container {
cursor: pointer;
margin: 0; margin: 0;
margin-bottom: $gl-padding; margin-bottom: $gl-padding;
font-size: 14px; font-size: 14px;
...@@ -19,12 +18,17 @@ $notification-box-shadow-color: rgba(0, 0, 0, 0.25); ...@@ -19,12 +18,17 @@ $notification-box-shadow-color: rgba(0, 0, 0, 0.25);
} }
} }
.close-icon { .close-icon-wrapper {
width: 16px; padding: ($gl-btn-padding + $gl-padding-4) $gl-padding $gl-btn-padding;
height: 16px;
position: absolute; position: absolute;
right: $gl-padding; right: 0;
top: $gl-padding; top: 0;
cursor: pointer;
.close-icon {
width: 16px;
height: 16px;
}
} }
.flash-notice, .flash-notice,
......
# frozen_string_literal: true
module Types
class ExtendedIssueType < IssueType
graphql_name 'ExtendedIssue'
authorize :read_issue
expose_permissions Types::PermissionTypes::Issue
present_using IssuePresenter
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Boolean flag for whether the currently logged in user is subscribed to this issue'
end
end
...@@ -49,6 +49,11 @@ module Types ...@@ -49,6 +49,11 @@ module Types
field :web_url, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions field :web_url, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :relative_position, GraphQL::INT_TYPE, null: true # rubocop:disable Graphql/Descriptions field :relative_position, GraphQL::INT_TYPE, null: true # rubocop:disable Graphql/Descriptions
field :epic, ::Types::EpicType, null: true, description: 'The epic to which issue belongs'
field :participants, Types::UserType.connection_type, null: true, complexity: 5, description: 'List of participants for the issue'
field :time_estimate, GraphQL::INT_TYPE, null: false, description: 'The time estimate on the issue'
field :total_time_spent, GraphQL::INT_TYPE, null: false, description: 'Total time reported as spent on the issue'
field :closed_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions field :closed_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions
......
...@@ -92,7 +92,7 @@ module Types ...@@ -92,7 +92,7 @@ module Types
resolver: Resolvers::IssuesResolver resolver: Resolvers::IssuesResolver
field :issue, # rubocop:disable Graphql/Descriptions field :issue, # rubocop:disable Graphql/Descriptions
Types::IssueType, Types::ExtendedIssueType,
null: true, null: true,
resolver: Resolvers::IssuesResolver.single resolver: Resolvers::IssuesResolver.single
......
...@@ -11,6 +11,10 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated ...@@ -11,6 +11,10 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated
url_builder.issue_path(issue) url_builder.issue_path(issue)
end end
def subscribed?
issue.subscribed?(current_user, issue.project)
end
private private
def url_builder def url_builder
......
...@@ -5,4 +5,5 @@ ...@@ -5,4 +5,5 @@
- if value - if value
%div{ class: "flash-content flash-#{key} rounded" } %div{ class: "flash-content flash-#{key} rounded" }
%span= value %span= value
= sprite_icon('close', size: 16, css_class: 'close-icon') %div{ class: "close-icon-wrapper js-close-icon" }
= sprite_icon('close', size: 16, css_class: 'close-icon')
...@@ -28,7 +28,7 @@ restart() ...@@ -28,7 +28,7 @@ restart()
stop stop
fi fi
killall killall
start_sidekiq -d -L $sidekiq_logfile >> $sidekiq_logfile 2>&1 start_sidekiq -P $sidekiq_pidfile -d -L $sidekiq_logfile >> $sidekiq_logfile 2>&1
} }
start_no_deamonize() start_no_deamonize()
...@@ -45,7 +45,7 @@ start_sidekiq() ...@@ -45,7 +45,7 @@ start_sidekiq()
cmd="${cmd} ${chpst} -P" cmd="${cmd} ${chpst} -P"
fi fi
${cmd} bundle exec sidekiq -C "${sidekiq_config}" -e $RAILS_ENV -P $sidekiq_pidfile "$@" ${cmd} bundle exec sidekiq -C "${sidekiq_config}" -e $RAILS_ENV "$@"
} }
load_ok() load_ok()
......
---
title: Add more attributes to issues GraphQL endpoint
merge_request: 17802
author:
type: changed
---
title: Banners should only be dismissable by clicking x button
merge_request: 17642
author:
type: changed
...@@ -28,18 +28,28 @@ either: ...@@ -28,18 +28,28 @@ either:
- Site-wide by modifying the settings in `gitlab.yml` and `gitlab.rb` for source - Site-wide by modifying the settings in `gitlab.yml` and `gitlab.rb` for source
and Omnibus installations respectively. and Omnibus installations respectively.
NOTE: **Note:**
This only applies to pipelines run as part of GitLab CI/CD. This will not enable or disable
pipelines that are run from an [external integration](../user/project/integrations/project_services.md#services).
## Per-project user setting ## Per-project user setting
The setting to enable or disable GitLab CI/CD can be found under your project's The setting to enable or disable GitLab CI/CD Pipelines can be found in your project in
**Settings > General > Permissions**. Choose one of "Disabled", "Only team members" **Settings > General > Visibility, project features, permissions**. If the project
or "Everyone with access" and hit **Save changes** for the settings to take effect. visibility is set to:
- **Private**, only project members can access pipelines.
- **Internal** or **Public**, pipelines can be made accessible to either
project members only or everyone with access.
Press **Save changes** for the settings to take effect.
![Sharing & Permissions settings](../user/project/settings/img/sharing_and_permissions_settings.png) ![Sharing & Permissions settings](../user/project/settings/img/sharing_and_permissions_settings_v12_3.png)
## Site-wide admin setting ## Site-wide admin setting
You can disable GitLab CI/CD site-wide, by modifying the settings in `gitlab.yml` You can disable GitLab CI/CD site-wide, by modifying the settings in `gitlab.yml`
and `gitlab.rb` for source and Omnibus installations respectively. for source installations, and `gitlab.rb` for Omnibus installations.
Two things to note: Two things to note:
......
...@@ -202,8 +202,36 @@ so we need to set some guidelines for their use going forward: ...@@ -202,8 +202,36 @@ so we need to set some guidelines for their use going forward:
order is required, otherwise `let` will suffice. Remember that `let` is lazy and won't order is required, otherwise `let` will suffice. Remember that `let` is lazy and won't
be evaluated until it is referenced. be evaluated until it is referenced.
### `let_it_be` variables
In some cases there is no need to recreate the same object for tests
again for each example. For example, a project is needed to test issues
on the same project, one project will do for the entire file. This can
be achieved by using
[`let_it_be`](https://test-prof.evilmartians.io/#/let_it_be) variables
from the [`test-prof` gem](https://rubygems.org/gems/test-prof).
Note that if you modify an object defined inside a `let_it_be` block,
then you will need to reload the object as needed, or specify the `reload`
option to reload for every example.
```
let_it_be(:project, reload: true) { create(:project) }
```
You can also specify the `refind` option as well to completely load a
new object.
```
let_it_be(:project, refind: true) { create(:project) }
```
### `set` variables ### `set` variables
NOTE: **Note:**
We are incrementally removing `set` in favour of `let_it_be`. See the
[removal issue](https://gitlab.com/gitlab-org/gitlab/issues/27922).
In some cases there is no need to recreate the same object for tests again for In some cases there is no need to recreate the same object for tests again for
each example. For example, a project is needed to test issues on the same each example. For example, a project is needed to test issues on the same
project, one project will do for the entire file. This can be achieved by using project, one project will do for the entire file. This can be achieved by using
......
...@@ -36,11 +36,19 @@ changes to be reviewed. ...@@ -36,11 +36,19 @@ changes to be reviewed.
## Only allow merge requests to be merged if the pipeline succeeds ## Only allow merge requests to be merged if the pipeline succeeds
You can prevent merge requests from being merged if their pipeline did not succeed You can prevent merge requests from being merged if their pipeline did not succeed
or if there are threads to be resolved. or if there are threads to be resolved. This works for both:
Navigate to your project's settings page and expand the **Merge requests** section. - GitLab CI/CD pipelines
In the **Merge checks** subsection, select the **Pipelines must succeed** check - Pipelines run from an [external CI integration](../integrations/project_services.md#services)
box and hit **Save** for the changes to take effect.
As a result, [disabling GitLab CI/CD pipelines](../../../ci/enable_or_disable_ci.md)
will not disable this feature, as it will still be possible to use pipelines from external
CI providers with this feature. To enable it, you must:
1. Navigate to your project's **Settings > General** page.
1. Expand the **Merge requests** section.
1. In the **Merge checks** subsection, select the **Pipelines must succeed** checkbox.
1. Press **Save** for the changes to take effect.
NOTE: **Note:** This setting also prevents merge requests from being merged if there is no pipeline. NOTE: **Note:** This setting also prevents merge requests from being merged if there is no pipeline.
......
...@@ -24,7 +24,7 @@ The project description also partially supports [standard markdown](../../markdo ...@@ -24,7 +24,7 @@ The project description also partially supports [standard markdown](../../markdo
Set up your project's access, [visibility](../../../public_access/public_access.md), and enable [Container Registry](../../packages/container_registry/index.md) for your projects: Set up your project's access, [visibility](../../../public_access/public_access.md), and enable [Container Registry](../../packages/container_registry/index.md) for your projects:
![projects sharing permissions](img/sharing_and_permissions_settings.png) ![projects sharing permissions](img/sharing_and_permissions_settings_v12_3.png)
If Issues are disabled, or you can't access Issues because you're not a project member, then Labels and Milestones If Issues are disabled, or you can't access Issues because you're not a project member, then Labels and Milestones
links will be missing from the sidebar UI. links will be missing from the sidebar UI.
......
...@@ -469,7 +469,7 @@ describe Admin::ClustersController do ...@@ -469,7 +469,7 @@ describe Admin::ClustersController do
end end
describe 'security' do describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, :instance) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :instance) }
it { expect { put_update }.to be_allowed_for(:admin) } it { expect { put_update }.to be_allowed_for(:admin) }
it { expect { put_update }.to be_denied_for(:user) } it { expect { put_update }.to be_denied_for(:user) }
...@@ -531,7 +531,7 @@ describe Admin::ClustersController do ...@@ -531,7 +531,7 @@ describe Admin::ClustersController do
end end
describe 'security' do describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, :instance) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, :instance) }
it { expect { delete_destroy }.to be_allowed_for(:admin) } it { expect { delete_destroy }.to be_allowed_for(:admin) }
it { expect { delete_destroy }.to be_denied_for(:user) } it { expect { delete_destroy }.to be_denied_for(:user) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
describe Admin::RequestsProfilesController do describe Admin::RequestsProfilesController do
set(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
before do before do
sign_in(admin) sign_in(admin)
......
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
describe Admin::UsersController do describe Admin::UsersController do
let(:user) { create(:user) } let(:user) { create(:user) }
set(:admin) { create(:admin) } let_it_be(:admin) { create(:admin) }
before do before do
sign_in(admin) sign_in(admin)
......
...@@ -6,7 +6,7 @@ describe Groups::ClustersController do ...@@ -6,7 +6,7 @@ describe Groups::ClustersController do
include AccessMatchersForController include AccessMatchersForController
include GoogleApi::CloudPlatformHelpers include GoogleApi::CloudPlatformHelpers
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
...@@ -536,7 +536,7 @@ describe Groups::ClustersController do ...@@ -536,7 +536,7 @@ describe Groups::ClustersController do
end end
describe 'security' do describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, cluster_type: :group_type, groups: [group]) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, cluster_type: :group_type, groups: [group]) }
it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(group) } it { expect { go }.to be_allowed_for(:owner).of(group) }
...@@ -604,7 +604,7 @@ describe Groups::ClustersController do ...@@ -604,7 +604,7 @@ describe Groups::ClustersController do
end end
describe 'security' do describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, cluster_type: :group_type, groups: [group]) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, cluster_type: :group_type, groups: [group]) }
it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(group) } it { expect { go }.to be_allowed_for(:owner).of(group) }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
describe Groups::LabelsController do describe Groups::LabelsController do
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project, namespace: group) } let_it_be(:project) { create(:project, namespace: group) }
before do before do
group.add_owner(user) group.add_owner(user)
...@@ -14,8 +14,8 @@ describe Groups::LabelsController do ...@@ -14,8 +14,8 @@ describe Groups::LabelsController do
end end
describe 'GET #index' do describe 'GET #index' do
set(:label_1) { create(:label, project: project, title: 'label_1') } let_it_be(:label_1) { create(:label, project: project, title: 'label_1') }
set(:group_label_1) { create(:group_label, group: group, title: 'group_label_1') } let_it_be(:group_label_1) { create(:group_label, group: group, title: 'group_label_1') }
it 'returns group and project labels by default' do it 'returns group and project labels by default' do
get :index, params: { group_id: group }, format: :json get :index, params: { group_id: group }, format: :json
...@@ -25,8 +25,8 @@ describe Groups::LabelsController do ...@@ -25,8 +25,8 @@ describe Groups::LabelsController do
end end
context 'with ancestor group' do context 'with ancestor group' do
set(:subgroup) { create(:group, parent: group) } let_it_be(:subgroup) { create(:group, parent: group) }
set(:subgroup_label_1) { create(:group_label, group: subgroup, title: 'subgroup_label_1') } let_it_be(:subgroup_label_1) { create(:group_label, group: subgroup, title: 'subgroup_label_1') }
before do before do
subgroup.add_owner(user) subgroup.add_owner(user)
......
...@@ -17,9 +17,9 @@ describe Groups::SharedProjectsController do ...@@ -17,9 +17,9 @@ describe Groups::SharedProjectsController do
).execute(group) ).execute(group)
end end
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:shared_project) do let_it_be(:shared_project) do
shared_project = create(:project, namespace: user.namespace) shared_project = create(:project, namespace: user.namespace)
share_project(shared_project) share_project(shared_project)
......
...@@ -39,7 +39,7 @@ describe Import::BitbucketServerController do ...@@ -39,7 +39,7 @@ describe Import::BitbucketServerController do
assign_session_tokens assign_session_tokens
end end
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
it 'returns the new project' do it 'returns the new project' do
allow(Gitlab::BitbucketServerImport::ProjectCreator) allow(Gitlab::BitbucketServerImport::ProjectCreator)
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require 'spec_helper' require 'spec_helper'
describe Import::GitlabProjectsController do describe Import::GitlabProjectsController do
set(:namespace) { create(:namespace) } let_it_be(:namespace) { create(:namespace) }
set(:user) { namespace.owner } let_it_be(:user) { namespace.owner }
let(:file) { fixture_file_upload('spec/fixtures/project_export.tar.gz', 'text/plain') } let(:file) { fixture_file_upload('spec/fixtures/project_export.tar.gz', 'text/plain') }
before do before do
......
...@@ -4,9 +4,9 @@ require 'spec_helper' ...@@ -4,9 +4,9 @@ require 'spec_helper'
describe Projects::ArtifactsController do describe Projects::ArtifactsController do
let(:user) { project.owner } let(:user) { project.owner }
set(:project) { create(:project, :repository, :public) } let_it_be(:project) { create(:project, :repository, :public) }
set(:pipeline) do let_it_be(:pipeline, reload: true) do
create(:ci_pipeline, create(:ci_pipeline,
project: project, project: project,
sha: project.commit.sha, sha: project.commit.sha,
...@@ -48,7 +48,7 @@ describe Projects::ArtifactsController do ...@@ -48,7 +48,7 @@ describe Projects::ArtifactsController do
it 'paginates artifacts' do it 'paginates artifacts' do
subject subject
expect(assigns(:artifacts)).to contain_exactly(project.job_artifacts.last) expect(assigns(:artifacts)).to contain_exactly(project.reload.job_artifacts.last)
end end
end end
end end
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
require 'spec_helper' require 'spec_helper'
describe Projects::AutocompleteSourcesController do describe Projects::AutocompleteSourcesController do
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:project) { create(:project, namespace: group) } let_it_be(:project) { create(:project, namespace: group) }
set(:issue) { create(:issue, project: project) } let_it_be(:issue) { create(:issue, project: project) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
describe 'GET members' do describe 'GET members' do
before do before do
......
...@@ -7,7 +7,7 @@ describe Projects::ClustersController do ...@@ -7,7 +7,7 @@ describe Projects::ClustersController do
include GoogleApi::CloudPlatformHelpers include GoogleApi::CloudPlatformHelpers
include KubernetesHelpers include KubernetesHelpers
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
...@@ -536,7 +536,7 @@ describe Projects::ClustersController do ...@@ -536,7 +536,7 @@ describe Projects::ClustersController do
end end
describe 'security' do describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) } it { expect { go }.to be_allowed_for(:owner).of(project) }
...@@ -605,7 +605,7 @@ describe Projects::ClustersController do ...@@ -605,7 +605,7 @@ describe Projects::ClustersController do
end end
describe 'security' do describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, projects: [project]) } let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, projects: [project]) }
it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) } it { expect { go }.to be_allowed_for(:owner).of(project) }
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
require 'spec_helper' require 'spec_helper'
describe Projects::CommitController do describe Projects::CommitController do
set(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:commit) { project.commit("master") }
let(:commit) { project.commit("master") }
let(:master_pickable_sha) { '7d3b0f7cff5f37573aea97cebfd5692ea1689924' } let(:master_pickable_sha) { '7d3b0f7cff5f37573aea97cebfd5692ea1689924' }
let(:master_pickable_commit) { project.commit(master_pickable_sha) } let(:master_pickable_commit) { project.commit(master_pickable_sha) }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Environments::PrometheusApiController do describe Projects::Environments::PrometheusApiController do
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:environment) { create(:environment, project: project) } let_it_be(:environment) { create(:environment, project: project) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
before do before do
project.add_reporter(user) project.add_reporter(user)
......
...@@ -5,10 +5,10 @@ require 'spec_helper' ...@@ -5,10 +5,10 @@ require 'spec_helper'
describe Projects::EnvironmentsController do describe Projects::EnvironmentsController do
include MetricsDashboardHelpers include MetricsDashboardHelpers
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:environment) do let_it_be(:environment) do
create(:environment, name: 'production', project: project) create(:environment, name: 'production', project: project)
end end
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require 'spec_helper' require 'spec_helper'
describe Projects::ErrorTrackingController do describe Projects::ErrorTrackingController do
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
before do before do
sign_in(user) sign_in(user)
......
...@@ -6,7 +6,7 @@ describe Projects::MirrorsController do ...@@ -6,7 +6,7 @@ describe Projects::MirrorsController do
include ReactiveCachingHelpers include ReactiveCachingHelpers
describe 'setting up a remote mirror' do describe 'setting up a remote mirror' do
set(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
context 'when the current project is not a mirror' do context 'when the current project is not a mirror' do
it 'allows to create a remote mirror' do it 'allows to create a remote mirror' do
......
...@@ -5,9 +5,9 @@ require 'spec_helper' ...@@ -5,9 +5,9 @@ require 'spec_helper'
describe Projects::PipelineSchedulesController do describe Projects::PipelineSchedulesController do
include AccessMatchersForController include AccessMatchersForController
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project, :public, :repository) } let_it_be(:project) { create(:project, :public, :repository) }
set(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project) } let_it_be(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project) }
before do before do
project.add_developer(user) project.add_developer(user)
...@@ -60,8 +60,6 @@ describe Projects::PipelineSchedulesController do ...@@ -60,8 +60,6 @@ describe Projects::PipelineSchedulesController do
end end
describe 'GET #new' do describe 'GET #new' do
set(:user) { create(:user) }
before do before do
project.add_developer(user) project.add_developer(user)
sign_in(user) sign_in(user)
...@@ -77,8 +75,6 @@ describe Projects::PipelineSchedulesController do ...@@ -77,8 +75,6 @@ describe Projects::PipelineSchedulesController do
describe 'POST #create' do describe 'POST #create' do
describe 'functionality' do describe 'functionality' do
set(:user) { create(:user) }
before do before do
project.add_developer(user) project.add_developer(user)
sign_in(user) sign_in(user)
...@@ -149,7 +145,6 @@ describe Projects::PipelineSchedulesController do ...@@ -149,7 +145,6 @@ describe Projects::PipelineSchedulesController do
describe 'PUT #update' do describe 'PUT #update' do
describe 'functionality' do describe 'functionality' do
set(:user) { create(:user) }
let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: user) } let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: user) }
before do before do
...@@ -383,7 +378,6 @@ describe Projects::PipelineSchedulesController do ...@@ -383,7 +378,6 @@ describe Projects::PipelineSchedulesController do
end end
describe 'POST #play', :clean_gitlab_redis_cache do describe 'POST #play', :clean_gitlab_redis_cache do
set(:user) { create(:user) }
let(:ref) { 'master' } let(:ref) { 'master' }
before do before do
...@@ -442,8 +436,6 @@ describe Projects::PipelineSchedulesController do ...@@ -442,8 +436,6 @@ describe Projects::PipelineSchedulesController do
end end
describe 'DELETE #destroy' do describe 'DELETE #destroy' do
set(:user) { create(:user) }
context 'when a developer makes the request' do context 'when a developer makes the request' do
before do before do
project.add_developer(user) project.add_developer(user)
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
describe Projects::PipelinesController do describe Projects::PipelinesController do
include ApiHelpers include ApiHelpers
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
let(:feature) { ProjectFeature::ENABLED } let(:feature) { ProjectFeature::ENABLED }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require 'spec_helper' require 'spec_helper'
describe Projects::PipelinesSettingsController do describe Projects::PipelinesSettingsController do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project_auto_devops) { create(:project_auto_devops) } let_it_be(:project_auto_devops) { create(:project_auto_devops) }
let(:project) { project_auto_devops.project } let(:project) { project_auto_devops.project }
before do before do
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require('spec_helper') require('spec_helper')
describe Projects::Settings::CiCdController do describe Projects::Settings::CiCdController do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project_auto_devops) { create(:project_auto_devops) } let_it_be(:project_auto_devops) { create(:project_auto_devops) }
let(:project) { project_auto_devops.project } let(:project) { project_auto_devops.project }
before do before do
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require 'spec_helper' require 'spec_helper'
describe Projects::Settings::OperationsController do describe Projects::Settings::OperationsController do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
before do before do
sign_in(user) sign_in(user)
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require 'spec_helper' require 'spec_helper'
describe Projects::WikisController do describe Projects::WikisController do
set(:project) { create(:project, :public, :repository) } let_it_be(:project) { create(:project, :public, :repository) }
set(:user) { project.owner } let(:user) { project.owner }
let(:project_wiki) { ProjectWiki.new(project, user) } let(:project_wiki) { ProjectWiki.new(project, user) }
let(:wiki) { project_wiki.wiki } let(:wiki) { project_wiki.wiki }
let(:wiki_title) { 'page title test' } let(:wiki_title) { 'page title test' }
......
...@@ -149,7 +149,7 @@ describe ProjectsController do ...@@ -149,7 +149,7 @@ describe ProjectsController do
end end
context 'when the storage is not available', :broken_storage do context 'when the storage is not available', :broken_storage do
set(:project) { create(:project, :broken_storage) } let_it_be(:project) { create(:project, :broken_storage) }
before do before do
project.add_developer(user) project.add_developer(user)
......
...@@ -67,7 +67,7 @@ describe SearchController do ...@@ -67,7 +67,7 @@ describe SearchController do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
render_views render_views
set(:project) { create(:project, :public, :repository, :wiki_repo) } let_it_be(:project) { create(:project, :public, :repository, :wiki_repo) }
before do before do
expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original
......
...@@ -4,6 +4,6 @@ FactoryBot.define do ...@@ -4,6 +4,6 @@ FactoryBot.define do
factory :abuse_report do factory :abuse_report do
reporter factory: :user reporter factory: :user
user user
message 'User sends spam' message { 'User sends spam' }
end end
end end
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
FactoryBot.define do FactoryBot.define do
factory :appearance do factory :appearance do
title "GitLab Community Edition" title { "GitLab Community Edition" }
description "Open source software to collaborate on code" description { "Open source software to collaborate on code" }
new_project_guidelines "Custom project guidelines" new_project_guidelines { "Custom project guidelines" }
end end
trait :with_logo do trait :with_logo do
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
FactoryBot.define do FactoryBot.define do
factory :application_setting do factory :application_setting do
default_projects_limit 42 default_projects_limit { 42 }
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
FactoryBot.define do FactoryBot.define do
factory :award_emoji do factory :award_emoji do
name "thumbsup" name { "thumbsup" }
user user
awardable factory: :issue awardable factory: :issue
...@@ -12,7 +12,7 @@ FactoryBot.define do ...@@ -12,7 +12,7 @@ FactoryBot.define do
trait :upvote trait :upvote
trait :downvote do trait :downvote do
name "thumbsdown" name { "thumbsdown" }
end end
end end
end end
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
FactoryBot.define do FactoryBot.define do
factory :board do factory :board do
transient do transient do
project nil project { nil }
group nil group { nil }
project_id nil project_id { nil }
group_id nil group_id { nil }
parent nil parent { nil }
end end
after(:build, :stub) do |board, evaluator| after(:build, :stub) do |board, evaluator|
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
FactoryBot.define do FactoryBot.define do
factory :broadcast_message do factory :broadcast_message do
message "MyText" message { "MyText" }
starts_at { 1.day.ago } starts_at { 1.day.ago }
ends_at { 1.day.from_now } ends_at { 1.day.from_now }
......
...@@ -5,8 +5,8 @@ FactoryBot.define do ...@@ -5,8 +5,8 @@ FactoryBot.define do
user factory: :user user factory: :user
service factory: :service service factory: :service
team_id 'T0001' team_id { 'T0001' }
team_domain 'Awesome Team' team_domain { 'Awesome Team' }
sequence(:chat_id) { |n| "U#{n}" } sequence(:chat_id) { |n| "U#{n}" }
chat_name { generate(:username) } chat_name { generate(:username) }
......
...@@ -2,22 +2,26 @@ ...@@ -2,22 +2,26 @@
FactoryBot.define do FactoryBot.define do
factory :ci_bridge, class: Ci::Bridge do factory :ci_bridge, class: Ci::Bridge do
name 'bridge' name { 'bridge' }
stage 'test' stage { 'test' }
stage_idx 0 stage_idx { 0 }
ref 'master' ref { 'master' }
tag false tag { false }
created_at 'Di 29. Okt 09:50:00 CET 2013' created_at { 'Di 29. Okt 09:50:00 CET 2013' }
status :created status { :created }
pipeline factory: :ci_pipeline pipeline factory: :ci_pipeline
trait :variables do trait :variables do
yaml_variables [{ key: 'BRIDGE', value: 'cross', public: true }] yaml_variables do
[{ key: 'BRIDGE', value: 'cross', public: true }]
end
end end
transient { downstream nil } transient do
transient { upstream nil } downstream { nil }
upstream { nil }
end
after(:build) do |bridge, evaluator| after(:build) do |bridge, evaluator|
bridge.project ||= bridge.pipeline.project bridge.project ||= bridge.pipeline.project
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
FactoryBot.define do FactoryBot.define do
factory :ci_build_trace_chunk, class: Ci::BuildTraceChunk do factory :ci_build_trace_chunk, class: Ci::BuildTraceChunk do
build factory: :ci_build build factory: :ci_build
chunk_index 0 chunk_index { 0 }
data_store :redis data_store { :redis }
trait :redis_with_data do trait :redis_with_data do
data_store :redis data_store { :redis }
transient do transient do
initial_data 'test data' initial_data { 'test data' }
end end
after(:create) do |build_trace_chunk, evaluator| after(:create) do |build_trace_chunk, evaluator|
...@@ -19,14 +19,14 @@ FactoryBot.define do ...@@ -19,14 +19,14 @@ FactoryBot.define do
end end
trait :redis_without_data do trait :redis_without_data do
data_store :redis data_store { :redis }
end end
trait :database_with_data do trait :database_with_data do
data_store :database data_store { :database}
transient do transient do
initial_data 'test data' initial_data { 'test data' }
end end
after(:build) do |build_trace_chunk, evaluator| after(:build) do |build_trace_chunk, evaluator|
...@@ -35,14 +35,14 @@ FactoryBot.define do ...@@ -35,14 +35,14 @@ FactoryBot.define do
end end
trait :database_without_data do trait :database_without_data do
data_store :database data_store { :database }
end end
trait :fog_with_data do trait :fog_with_data do
data_store :fog data_store { :fog }
transient do transient do
initial_data 'test data' initial_data { 'test data' }
end end
after(:create) do |build_trace_chunk, evaluator| after(:create) do |build_trace_chunk, evaluator|
...@@ -51,7 +51,7 @@ FactoryBot.define do ...@@ -51,7 +51,7 @@ FactoryBot.define do
end end
trait :fog_without_data do trait :fog_without_data do
data_store :fog data_store { :fog }
end end
end end
end end
...@@ -4,13 +4,13 @@ include ActionDispatch::TestProcess ...@@ -4,13 +4,13 @@ include ActionDispatch::TestProcess
FactoryBot.define do FactoryBot.define do
factory :ci_build, class: Ci::Build do factory :ci_build, class: Ci::Build do
name 'test' name { 'test' }
stage 'test' stage { 'test' }
stage_idx 0 stage_idx { 0 }
ref 'master' ref { 'master' }
tag false tag { false }
protected false add_attribute(:protected) { false }
created_at 'Di 29. Okt 09:50:00 CET 2013' created_at { 'Di 29. Okt 09:50:00 CET 2013' }
pending pending
options do options do
...@@ -30,127 +30,127 @@ FactoryBot.define do ...@@ -30,127 +30,127 @@ FactoryBot.define do
pipeline factory: :ci_pipeline pipeline factory: :ci_pipeline
trait :degenerated do trait :degenerated do
options nil options { nil }
yaml_variables nil yaml_variables { nil }
end end
trait :started do trait :started do
started_at 'Di 29. Okt 09:51:28 CET 2013' started_at { 'Di 29. Okt 09:51:28 CET 2013' }
end end
trait :finished do trait :finished do
started started
finished_at 'Di 29. Okt 09:53:28 CET 2013' finished_at { 'Di 29. Okt 09:53:28 CET 2013' }
end end
trait :success do trait :success do
finished finished
status 'success' status { 'success' }
end end
trait :failed do trait :failed do
finished finished
status 'failed' status { 'failed' }
end end
trait :canceled do trait :canceled do
finished finished
status 'canceled' status { 'canceled' }
end end
trait :skipped do trait :skipped do
started started
status 'skipped' status { 'skipped' }
end end
trait :running do trait :running do
started started
status 'running' status { 'running' }
end end
trait :pending do trait :pending do
queued_at 'Di 29. Okt 09:50:59 CET 2013' queued_at { 'Di 29. Okt 09:50:59 CET 2013' }
status 'pending' status { 'pending' }
end end
trait :created do trait :created do
status 'created' status { 'created' }
end end
trait :preparing do trait :preparing do
status 'preparing' status { 'preparing' }
end end
trait :scheduled do trait :scheduled do
schedulable schedulable
status 'scheduled' status { 'scheduled' }
scheduled_at { 1.minute.since } scheduled_at { 1.minute.since }
end end
trait :expired_scheduled do trait :expired_scheduled do
schedulable schedulable
status 'scheduled' status { 'scheduled' }
scheduled_at { 1.minute.ago } scheduled_at { 1.minute.ago }
end end
trait :manual do trait :manual do
status 'manual' status { 'manual' }
self.when 'manual' self.when { 'manual' }
end end
trait :teardown_environment do trait :teardown_environment do
environment 'staging' environment { 'staging' }
options do options do
{ {
script: %w(ls), script: %w(ls),
environment: { name: 'staging', environment: { name: 'staging',
action: 'stop', action: 'stop',
url: 'http://staging.example.com/$CI_JOB_NAME' } url: 'http://staging.example.com/$CI_JOB_NAME' }
} }
end end
end end
trait :deploy_to_production do trait :deploy_to_production do
environment 'production' environment { 'production' }
options do options do
{ {
script: %w(ls), script: %w(ls),
environment: { name: 'production', environment: { name: 'production',
url: 'http://prd.example.com/$CI_JOB_NAME' } url: 'http://prd.example.com/$CI_JOB_NAME' }
} }
end end
end end
trait :start_review_app do trait :start_review_app do
environment 'review/$CI_COMMIT_REF_NAME' environment { 'review/$CI_COMMIT_REF_NAME' }
options do options do
{ {
script: %w(ls), script: %w(ls),
environment: { name: 'review/$CI_COMMIT_REF_NAME', environment: { name: 'review/$CI_COMMIT_REF_NAME',
url: 'http://staging.example.com/$CI_JOB_NAME', url: 'http://staging.example.com/$CI_JOB_NAME',
on_stop: 'stop_review_app' } on_stop: 'stop_review_app' }
} }
end end
end end
trait :stop_review_app do trait :stop_review_app do
name 'stop_review_app' name { 'stop_review_app' }
environment 'review/$CI_COMMIT_REF_NAME' environment { 'review/$CI_COMMIT_REF_NAME' }
options do options do
{ {
script: %w(ls), script: %w(ls),
environment: { name: 'review/$CI_COMMIT_REF_NAME', environment: { name: 'review/$CI_COMMIT_REF_NAME',
url: 'http://staging.example.com/$CI_JOB_NAME', url: 'http://staging.example.com/$CI_JOB_NAME',
action: 'stop' } action: 'stop' }
} }
end end
end end
trait :allowed_to_fail do trait :allowed_to_fail do
allow_failure true allow_failure { true }
end end
trait :ignored do trait :ignored do
...@@ -166,7 +166,7 @@ FactoryBot.define do ...@@ -166,7 +166,7 @@ FactoryBot.define do
end end
trait :schedulable do trait :schedulable do
self.when 'delayed' self.when { 'delayed' }
options do options do
{ {
...@@ -177,11 +177,11 @@ FactoryBot.define do ...@@ -177,11 +177,11 @@ FactoryBot.define do
end end
trait :actionable do trait :actionable do
self.when 'manual' self.when { 'manual' }
end end
trait :retried do trait :retried do
retried true retried { true }
end end
trait :cancelable do trait :cancelable do
...@@ -194,11 +194,13 @@ FactoryBot.define do ...@@ -194,11 +194,13 @@ FactoryBot.define do
end end
trait :tags do trait :tags do
tag_list [:docker, :ruby] tag_list do
[:docker, :ruby]
end
end end
trait :on_tag do trait :on_tag do
tag true tag { true }
end end
trait :triggered do trait :triggered do
...@@ -210,12 +212,12 @@ FactoryBot.define do ...@@ -210,12 +212,12 @@ FactoryBot.define do
end end
trait :tag do trait :tag do
tag true tag { true }
end end
trait :coverage do trait :coverage do
coverage 99.9 coverage { 99.9 }
coverage_regex '/(d+)/' coverage_regex { '/(d+)/' }
end end
trait :trace_live do trait :trace_live do
...@@ -303,23 +305,23 @@ FactoryBot.define do ...@@ -303,23 +305,23 @@ FactoryBot.define do
trait :extended_options do trait :extended_options do
options do options do
{ {
image: { name: 'ruby:2.1', entrypoint: '/bin/sh' }, image: { name: 'ruby:2.1', entrypoint: '/bin/sh' },
services: ['postgres', { name: 'docker:stable-dind', entrypoint: '/bin/sh', command: 'sleep 30', alias: 'docker' }], services: ['postgres', { name: 'docker:stable-dind', entrypoint: '/bin/sh', command: 'sleep 30', alias: 'docker' }],
script: %w(echo), script: %w(echo),
after_script: %w(ls date), after_script: %w(ls date),
artifacts: { artifacts: {
name: 'artifacts_file', name: 'artifacts_file',
untracked: false, untracked: false,
paths: ['out/'], paths: ['out/'],
when: 'always', when: 'always',
expire_in: '7d' expire_in: '7d'
}, },
cache: { cache: {
key: 'cache_key', key: 'cache_key',
untracked: false, untracked: false,
paths: ['vendor/*'], paths: ['vendor/*'],
policy: 'pull-push' policy: 'pull-push'
} }
} }
end end
end end
...@@ -329,27 +331,27 @@ FactoryBot.define do ...@@ -329,27 +331,27 @@ FactoryBot.define do
end end
trait :non_playable do trait :non_playable do
status 'created' status { 'created' }
self.when 'manual' self.when { 'manual' }
end end
trait :protected do trait :protected do
protected true add_attribute(:protected) { true }
end end
trait :script_failure do trait :script_failure do
failed failed
failure_reason 1 failure_reason { 1 }
end end
trait :api_failure do trait :api_failure do
failed failed
failure_reason 2 failure_reason { 2 }
end end
trait :prerequisite_failure do trait :prerequisite_failure do
failed failed
failure_reason 10 failure_reason { 10 }
end end
trait :with_runner_session do trait :with_runner_session do
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
FactoryBot.define do FactoryBot.define do
factory :ci_group_variable, class: Ci::GroupVariable do factory :ci_group_variable, class: Ci::GroupVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
value 'VARIABLE_VALUE' value { 'VARIABLE_VALUE' }
masked false masked { false }
trait(:protected) do trait(:protected) do
protected true add_attribute(:protected) { true }
end end
group factory: :group group factory: :group
......
...@@ -5,15 +5,15 @@ include ActionDispatch::TestProcess ...@@ -5,15 +5,15 @@ include ActionDispatch::TestProcess
FactoryBot.define do FactoryBot.define do
factory :ci_job_artifact, class: Ci::JobArtifact do factory :ci_job_artifact, class: Ci::JobArtifact do
job factory: :ci_build job factory: :ci_build
file_type :archive file_type { :archive }
file_format :zip file_format { :zip }
trait :expired do trait :expired do
expire_at { Date.yesterday } expire_at { Date.yesterday }
end end
trait :remote_store do trait :remote_store do
file_store JobArtifactUploader::Store::REMOTE file_store { JobArtifactUploader::Store::REMOTE}
end end
after :build do |artifact| after :build do |artifact|
...@@ -21,7 +21,7 @@ FactoryBot.define do ...@@ -21,7 +21,7 @@ FactoryBot.define do
end end
trait :raw do trait :raw do
file_format :raw file_format { :raw }
after(:build) do |artifact, _| after(:build) do |artifact, _|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -30,7 +30,7 @@ FactoryBot.define do ...@@ -30,7 +30,7 @@ FactoryBot.define do
end end
trait :zip do trait :zip do
file_format :zip file_format { :zip }
after(:build) do |artifact, _| after(:build) do |artifact, _|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -39,7 +39,7 @@ FactoryBot.define do ...@@ -39,7 +39,7 @@ FactoryBot.define do
end end
trait :gzip do trait :gzip do
file_format :gzip file_format { :gzip }
after(:build) do |artifact, _| after(:build) do |artifact, _|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -48,8 +48,8 @@ FactoryBot.define do ...@@ -48,8 +48,8 @@ FactoryBot.define do
end end
trait :archive do trait :archive do
file_type :archive file_type { :archive }
file_format :zip file_format { :zip }
transient do transient do
file { fixture_file_upload(Rails.root.join('spec/fixtures/ci_build_artifacts.zip'), 'application/zip') } file { fixture_file_upload(Rails.root.join('spec/fixtures/ci_build_artifacts.zip'), 'application/zip') }
...@@ -63,12 +63,12 @@ FactoryBot.define do ...@@ -63,12 +63,12 @@ FactoryBot.define do
trait :legacy_archive do trait :legacy_archive do
archive archive
file_location :legacy_path file_location { :legacy_path }
end end
trait :metadata do trait :metadata do
file_type :metadata file_type { :metadata }
file_format :gzip file_format { :gzip }
transient do transient do
file { fixture_file_upload(Rails.root.join('spec/fixtures/ci_build_artifacts_metadata.gz'), 'application/x-gzip') } file { fixture_file_upload(Rails.root.join('spec/fixtures/ci_build_artifacts_metadata.gz'), 'application/x-gzip') }
...@@ -80,8 +80,8 @@ FactoryBot.define do ...@@ -80,8 +80,8 @@ FactoryBot.define do
end end
trait :trace do trait :trace do
file_type :trace file_type { :trace }
file_format :raw file_format { :raw }
after(:build) do |artifact, evaluator| after(:build) do |artifact, evaluator|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -90,8 +90,8 @@ FactoryBot.define do ...@@ -90,8 +90,8 @@ FactoryBot.define do
end end
trait :junit do trait :junit do
file_type :junit file_type { :junit }
file_format :gzip file_format { :gzip }
after(:build) do |artifact, evaluator| after(:build) do |artifact, evaluator|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -100,8 +100,8 @@ FactoryBot.define do ...@@ -100,8 +100,8 @@ FactoryBot.define do
end end
trait :junit_with_ant do trait :junit_with_ant do
file_type :junit file_type { :junit }
file_format :gzip file_format { :gzip }
after(:build) do |artifact, evaluator| after(:build) do |artifact, evaluator|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -110,8 +110,8 @@ FactoryBot.define do ...@@ -110,8 +110,8 @@ FactoryBot.define do
end end
trait :junit_with_three_testsuites do trait :junit_with_three_testsuites do
file_type :junit file_type { :junit }
file_format :gzip file_format { :gzip }
after(:build) do |artifact, evaluator| after(:build) do |artifact, evaluator|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -120,8 +120,8 @@ FactoryBot.define do ...@@ -120,8 +120,8 @@ FactoryBot.define do
end end
trait :junit_with_corrupted_data do trait :junit_with_corrupted_data do
file_type :junit file_type { :junit }
file_format :gzip file_format { :gzip }
after(:build) do |artifact, evaluator| after(:build) do |artifact, evaluator|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
...@@ -130,8 +130,8 @@ FactoryBot.define do ...@@ -130,8 +130,8 @@ FactoryBot.define do
end end
trait :codequality do trait :codequality do
file_type :codequality file_type { :codequality }
file_format :raw file_format { :raw }
after(:build) do |artifact, evaluator| after(:build) do |artifact, evaluator|
artifact.file = fixture_file_upload( artifact.file = fixture_file_upload(
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
FactoryBot.define do FactoryBot.define do
factory :ci_job_variable, class: Ci::JobVariable do factory :ci_job_variable, class: Ci::JobVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
value 'VARIABLE_VALUE' value { 'VARIABLE_VALUE' }
job factory: :ci_build job factory: :ci_build
end end
......
...@@ -2,40 +2,40 @@ ...@@ -2,40 +2,40 @@
FactoryBot.define do FactoryBot.define do
factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do
cron '0 1 * * *' cron { '0 1 * * *' }
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_timezone { Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE }
ref 'master' ref { 'master' }
active true active { true }
description "pipeline schedule" description { "pipeline schedule" }
project project
trait :every_minute do trait :every_minute do
cron '*/1 * * * *' cron { '*/1 * * * *' }
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_timezone { Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE }
end end
trait :hourly do trait :hourly do
cron '* */1 * * *' cron { '* */1 * * *' }
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_timezone { Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE }
end end
trait :nightly do trait :nightly do
cron '0 1 * * *' cron { '0 1 * * *' }
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_timezone { Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE }
end end
trait :weekly do trait :weekly do
cron '0 1 * * 6' cron { '0 1 * * 6' }
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_timezone { Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE }
end end
trait :monthly do trait :monthly do
cron '0 1 22 * *' cron { '0 1 22 * *' }
cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_timezone { Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE }
end end
trait :inactive do trait :inactive do
active false active { false }
end end
end end
end end
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
FactoryBot.define do FactoryBot.define do
factory :ci_pipeline_schedule_variable, class: Ci::PipelineScheduleVariable do factory :ci_pipeline_schedule_variable, class: Ci::PipelineScheduleVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
value 'VARIABLE_VALUE' value { 'VARIABLE_VALUE' }
variable_type 'env_var' variable_type { 'env_var' }
pipeline_schedule factory: :ci_pipeline_schedule pipeline_schedule factory: :ci_pipeline_schedule
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
FactoryBot.define do FactoryBot.define do
factory :ci_pipeline_variable, class: Ci::PipelineVariable do factory :ci_pipeline_variable, class: Ci::PipelineVariable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
value 'VARIABLE_VALUE' value { 'VARIABLE_VALUE' }
pipeline factory: :ci_empty_pipeline pipeline factory: :ci_empty_pipeline
end end
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
FactoryBot.define do FactoryBot.define do
factory :ci_empty_pipeline, class: Ci::Pipeline do factory :ci_empty_pipeline, class: Ci::Pipeline do
source :push source { :push }
ref 'master' ref { 'master' }
sha '97de212e80737a608d939f648d959671fb0a0142' sha { '97de212e80737a608d939f648d959671fb0a0142' }
status 'pending' status { 'pending' }
protected false add_attribute(:protected) { false }
project project
...@@ -26,7 +26,7 @@ FactoryBot.define do ...@@ -26,7 +26,7 @@ FactoryBot.define do
# Persist merge request head_pipeline_id # Persist merge request head_pipeline_id
# on pipeline factories to avoid circular references # on pipeline factories to avoid circular references
transient { head_pipeline_of nil } transient { head_pipeline_of { nil } }
after(:create) do |pipeline, evaluator| after(:create) do |pipeline, evaluator|
merge_request = evaluator.head_pipeline_of merge_request = evaluator.head_pipeline_of
...@@ -34,7 +34,7 @@ FactoryBot.define do ...@@ -34,7 +34,7 @@ FactoryBot.define do
end end
factory :ci_pipeline do factory :ci_pipeline do
transient { config nil } transient { config { nil } }
after(:build) do |pipeline, evaluator| after(:build) do |pipeline, evaluator|
if evaluator.config if evaluator.config
...@@ -48,44 +48,47 @@ FactoryBot.define do ...@@ -48,44 +48,47 @@ FactoryBot.define do
end end
trait :invalid do trait :invalid do
config(rspec: nil) config do
failure_reason :config_error { rspec: nil }
end
failure_reason { :config_error }
end end
trait :created do trait :created do
status :created status { :created }
end end
trait :preparing do trait :preparing do
status :preparing status { :preparing }
end end
trait :blocked do trait :blocked do
status :manual status { :manual }
end end
trait :scheduled do trait :scheduled do
status :scheduled status { :scheduled }
end end
trait :success do trait :success do
status :success status { :success }
end end
trait :running do trait :running do
status :running status { :running }
end end
trait :failed do trait :failed do
status :failed status { :failed }
end end
trait :protected do trait :protected do
protected true add_attribute(:protected) { true }
end end
trait :with_test_reports do trait :with_test_reports do
status :success status { :success }
after(:build) do |pipeline, evaluator| after(:build) do |pipeline, evaluator|
pipeline.builds << build(:ci_build, :test_reports, pipeline: pipeline, project: pipeline.project) pipeline.builds << build(:ci_build, :test_reports, pipeline: pipeline, project: pipeline.project)
......
...@@ -4,22 +4,22 @@ FactoryBot.define do ...@@ -4,22 +4,22 @@ FactoryBot.define do
factory :ci_runner, class: Ci::Runner do factory :ci_runner, class: Ci::Runner do
sequence(:description) { |n| "My runner#{n}" } sequence(:description) { |n| "My runner#{n}" }
platform "darwin" platform { "darwin" }
active true active { true }
access_level :not_protected access_level { :not_protected }
runner_type :instance_type runner_type { :instance_type }
trait :online do trait :online do
contacted_at { Time.now } contacted_at { Time.now }
end end
trait :instance do trait :instance do
runner_type :instance_type runner_type { :instance_type }
end end
trait :group do trait :group do
runner_type :group_type runner_type { :group_type }
after(:build) do |runner, evaluator| after(:build) do |runner, evaluator|
runner.groups << build(:group) if runner.groups.empty? runner.groups << build(:group) if runner.groups.empty?
...@@ -27,7 +27,7 @@ FactoryBot.define do ...@@ -27,7 +27,7 @@ FactoryBot.define do
end end
trait :project do trait :project do
runner_type :project_type runner_type { :project_type }
after(:build) do |runner, evaluator| after(:build) do |runner, evaluator|
runner.projects << build(:project) if runner.projects.empty? runner.projects << build(:project) if runner.projects.empty?
...@@ -43,21 +43,21 @@ FactoryBot.define do ...@@ -43,21 +43,21 @@ FactoryBot.define do
end end
trait :inactive do trait :inactive do
active false active { false }
end end
trait :ref_protected do trait :ref_protected do
access_level :ref_protected access_level { :ref_protected }
end end
trait :tagged_only do trait :tagged_only do
run_untagged false run_untagged { false }
tag_list %w(tag1 tag2) tag_list { %w(tag1 tag2) }
end end
trait :locked do trait :locked do
locked true locked { true }
end end
end end
end end
...@@ -5,16 +5,16 @@ FactoryBot.define do ...@@ -5,16 +5,16 @@ FactoryBot.define do
skip_create skip_create
transient do transient do
name 'test' name { 'test' }
status nil status { nil }
warnings nil warnings { nil }
pipeline factory: :ci_empty_pipeline pipeline factory: :ci_empty_pipeline
end end
initialize_with do initialize_with do
Ci::LegacyStage.new(pipeline, name: name, Ci::LegacyStage.new(pipeline, name: name,
status: status, status: status,
warnings: warnings) warnings: warnings)
end end
end end
...@@ -22,8 +22,8 @@ FactoryBot.define do ...@@ -22,8 +22,8 @@ FactoryBot.define do
project factory: :project project factory: :project
pipeline factory: :ci_empty_pipeline pipeline factory: :ci_empty_pipeline
name 'test' name { 'test' }
position 1 position { 1 }
status 'pending' status { 'pending' }
end end
end end
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
FactoryBot.define do FactoryBot.define do
factory :ci_variable, class: Ci::Variable do factory :ci_variable, class: Ci::Variable do
sequence(:key) { |n| "VARIABLE_#{n}" } sequence(:key) { |n| "VARIABLE_#{n}" }
value 'VARIABLE_VALUE' value { 'VARIABLE_VALUE' }
masked false masked { false }
trait(:protected) do trait(:protected) do
protected true add_attribute(:protected) { true }
end end
project project
......
...@@ -19,50 +19,50 @@ FactoryBot.define do ...@@ -19,50 +19,50 @@ FactoryBot.define do
end end
trait :not_installable do trait :not_installable do
status(-2) status { -2 }
end end
trait :errored do trait :errored do
status(-1) status { -1 }
status_reason 'something went wrong' status_reason { 'something went wrong' }
end end
trait :installable do trait :installable do
status 0 status { 0 }
end end
trait :scheduled do trait :scheduled do
status 1 status { 1 }
end end
trait :installing do trait :installing do
status 2 status { 2 }
end end
trait :installed do trait :installed do
status 3 status { 3 }
end end
trait :updating do trait :updating do
status 4 status { 4 }
end end
trait :updated do trait :updated do
status 5 status { 5 }
end end
trait :update_errored do trait :update_errored do
status(6) status { 6 }
status_reason 'something went wrong' status_reason { 'something went wrong' }
end end
trait :uninstalling do trait :uninstalling do
status 7 status { 7 }
end end
trait :uninstall_errored do trait :uninstall_errored do
status(8) status { 8 }
status_reason 'something went wrong' status_reason { 'something went wrong' }
end end
trait :timed_out do trait :timed_out do
...@@ -75,7 +75,7 @@ FactoryBot.define do ...@@ -75,7 +75,7 @@ FactoryBot.define do
end end
factory :clusters_applications_cert_manager, class: Clusters::Applications::CertManager do factory :clusters_applications_cert_manager, class: Clusters::Applications::CertManager do
email 'admin@example.com' email { 'admin@example.com' }
cluster factory: %i(cluster with_installed_helm provided_by_gcp) cluster factory: %i(cluster with_installed_helm provided_by_gcp)
end end
...@@ -89,7 +89,7 @@ FactoryBot.define do ...@@ -89,7 +89,7 @@ FactoryBot.define do
end end
factory :clusters_applications_knative, class: Clusters::Applications::Knative do factory :clusters_applications_knative, class: Clusters::Applications::Knative do
hostname 'example.com' hostname { 'example.com' }
cluster factory: %i(cluster with_installed_helm provided_by_gcp) cluster factory: %i(cluster with_installed_helm provided_by_gcp)
end end
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
FactoryBot.define do FactoryBot.define do
factory :cluster, class: Clusters::Cluster do factory :cluster, class: Clusters::Cluster do
user user
name 'test-cluster' name { 'test-cluster' }
cluster_type :project_type cluster_type { :project_type }
managed true managed { true }
namespace_per_environment true namespace_per_environment { true }
factory :cluster_for_group, traits: [:provided_by_gcp, :group] factory :cluster_for_group, traits: [:provided_by_gcp, :group]
...@@ -31,26 +31,26 @@ FactoryBot.define do ...@@ -31,26 +31,26 @@ FactoryBot.define do
end end
trait :namespace_per_environment_disabled do trait :namespace_per_environment_disabled do
namespace_per_environment false namespace_per_environment { false }
end end
trait :provided_by_user do trait :provided_by_user do
provider_type :user provider_type { :user }
platform_type :kubernetes platform_type { :kubernetes }
platform_kubernetes factory: [:cluster_platform_kubernetes, :configured] platform_kubernetes factory: [:cluster_platform_kubernetes, :configured]
end end
trait :provided_by_gcp do trait :provided_by_gcp do
provider_type :gcp provider_type { :gcp }
platform_type :kubernetes platform_type { :kubernetes }
provider_gcp factory: [:cluster_provider_gcp, :created] provider_gcp factory: [:cluster_provider_gcp, :created]
platform_kubernetes factory: [:cluster_platform_kubernetes, :configured] platform_kubernetes factory: [:cluster_platform_kubernetes, :configured]
end end
trait :providing_by_gcp do trait :providing_by_gcp do
provider_type :gcp provider_type { :gcp }
provider_gcp factory: [:cluster_provider_gcp, :creating] provider_gcp factory: [:cluster_provider_gcp, :creating]
end end
...@@ -63,7 +63,7 @@ FactoryBot.define do ...@@ -63,7 +63,7 @@ FactoryBot.define do
end end
trait :disabled do trait :disabled do
enabled false enabled { false }
end end
trait :production_environment do trait :production_environment do
...@@ -75,11 +75,11 @@ FactoryBot.define do ...@@ -75,11 +75,11 @@ FactoryBot.define do
end end
trait :with_domain do trait :with_domain do
domain 'example.com' domain { 'example.com' }
end end
trait :not_managed do trait :not_managed do
managed false managed { false }
end end
end end
end end
...@@ -27,7 +27,7 @@ FactoryBot.define do ...@@ -27,7 +27,7 @@ FactoryBot.define do
end end
trait :without_token do trait :without_token do
service_account_token nil service_account_token { nil }
end end
end end
end end
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
FactoryBot.define do FactoryBot.define do
factory :cluster_platform_kubernetes, class: Clusters::Platforms::Kubernetes do factory :cluster_platform_kubernetes, class: Clusters::Platforms::Kubernetes do
cluster cluster
namespace nil namespace { nil }
api_url 'https://kubernetes.example.com' api_url { 'https://kubernetes.example.com' }
token { 'a' * 40 } token { 'a' * 40 }
trait :configured do trait :configured do
api_url 'https://kubernetes.example.com' api_url { 'https://kubernetes.example.com' }
username 'xxxxxx' username { 'xxxxxx' }
password 'xxxxxx' password { 'xxxxxx' }
before(:create) do |platform_kubernetes, evaluator| before(:create) do |platform_kubernetes, evaluator|
pem_file = File.expand_path(Rails.root.join('spec/fixtures/clusters/sample_cert.pem')) pem_file = File.expand_path(Rails.root.join('spec/fixtures/clusters/sample_cert.pem'))
...@@ -19,7 +19,7 @@ FactoryBot.define do ...@@ -19,7 +19,7 @@ FactoryBot.define do
end end
trait :rbac_disabled do trait :rbac_disabled do
authorization_type :abac authorization_type { :abac }
end end
end end
end end
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
FactoryBot.define do FactoryBot.define do
factory :cluster_provider_gcp, class: Clusters::Providers::Gcp do factory :cluster_provider_gcp, class: Clusters::Providers::Gcp do
cluster cluster
gcp_project_id 'test-gcp-project' gcp_project_id { 'test-gcp-project' }
trait :scheduled do trait :scheduled do
access_token 'access_token_123' access_token { 'access_token_123' }
end end
trait :creating do trait :creating do
access_token 'access_token_123' access_token { 'access_token_123' }
after(:build) do |gcp, evaluator| after(:build) do |gcp, evaluator|
gcp.make_creating('operation-123') gcp.make_creating('operation-123')
...@@ -18,7 +18,7 @@ FactoryBot.define do ...@@ -18,7 +18,7 @@ FactoryBot.define do
end end
trait :created do trait :created do
endpoint '111.111.111.111' endpoint { '111.111.111.111' }
after(:build) do |gcp, evaluator| after(:build) do |gcp, evaluator|
gcp.make_created gcp.make_created
...@@ -32,11 +32,11 @@ FactoryBot.define do ...@@ -32,11 +32,11 @@ FactoryBot.define do
end end
trait :abac_enabled do trait :abac_enabled do
legacy_abac true legacy_abac { true }
end end
trait :cloud_run_enabled do trait :cloud_run_enabled do
cloud_run true cloud_run { true }
end end
end end
end end
...@@ -2,53 +2,53 @@ ...@@ -2,53 +2,53 @@
FactoryBot.define do FactoryBot.define do
factory :commit_status, class: CommitStatus do factory :commit_status, class: CommitStatus do
name 'default' name { 'default' }
stage 'test' stage { 'test' }
stage_idx 0 stage_idx { 0 }
status 'success' status { 'success' }
description 'commit status' description { 'commit status'}
pipeline factory: :ci_pipeline_with_one_job pipeline factory: :ci_pipeline_with_one_job
started_at 'Tue, 26 Jan 2016 08:21:42 +0100' started_at { 'Tue, 26 Jan 2016 08:21:42 +0100'}
finished_at 'Tue, 26 Jan 2016 08:23:42 +0100' finished_at { 'Tue, 26 Jan 2016 08:23:42 +0100'}
trait :success do trait :success do
status 'success' status { 'success' }
end end
trait :failed do trait :failed do
status 'failed' status { 'failed' }
end end
trait :canceled do trait :canceled do
status 'canceled' status { 'canceled' }
end end
trait :skipped do trait :skipped do
status 'skipped' status { 'skipped' }
end end
trait :running do trait :running do
status 'running' status { 'running' }
end end
trait :pending do trait :pending do
status 'pending' status { 'pending' }
end end
trait :preparing do trait :preparing do
status 'preparing' status { 'preparing' }
end end
trait :created do trait :created do
status 'created' status { 'created' }
end end
trait :manual do trait :manual do
status 'manual' status { 'manual' }
end end
trait :scheduled do trait :scheduled do
status 'scheduled' status { 'scheduled' }
end end
after(:build) do |build, evaluator| after(:build) do |build, evaluator|
...@@ -56,8 +56,8 @@ FactoryBot.define do ...@@ -56,8 +56,8 @@ FactoryBot.define do
end end
factory :generic_commit_status, class: GenericCommitStatus do factory :generic_commit_status, class: GenericCommitStatus do
name 'generic' name { 'generic' }
description 'external commit status' description { 'external commit status' }
end end
end end
end end
...@@ -5,7 +5,7 @@ require_relative '../support/helpers/repo_helpers' ...@@ -5,7 +5,7 @@ require_relative '../support/helpers/repo_helpers'
FactoryBot.define do FactoryBot.define do
factory :commit do factory :commit do
transient do transient do
author nil author { nil }
end end
git_commit do git_commit do
......
...@@ -6,11 +6,11 @@ FactoryBot.define do ...@@ -6,11 +6,11 @@ FactoryBot.define do
project project
transient do transient do
tags [] tags { [] }
end end
trait :root do trait :root do
name '' name { '' }
end end
after(:build) do |repository, evaluator| after(:build) do |repository, evaluator|
......
...@@ -2,44 +2,44 @@ ...@@ -2,44 +2,44 @@
FactoryBot.define do FactoryBot.define do
factory :conversational_development_index_metric, class: ConversationalDevelopmentIndex::Metric do factory :conversational_development_index_metric, class: ConversationalDevelopmentIndex::Metric do
leader_issues 9.256 leader_issues { 9.256 }
instance_issues 1.234 instance_issues { 1.234 }
percentage_issues 13.331 percentage_issues { 13.331 }
leader_notes 30.33333 leader_notes { 30.33333 }
instance_notes 28.123 instance_notes { 28.123 }
percentage_notes 92.713 percentage_notes { 92.713 }
leader_milestones 16.2456 leader_milestones { 16.2456 }
instance_milestones 1.234 instance_milestones { 1.234 }
percentage_milestones 7.595 percentage_milestones { 7.595 }
leader_boards 5.2123 leader_boards { 5.2123 }
instance_boards 3.254 instance_boards { 3.254 }
percentage_boards 62.429 percentage_boards { 62.429 }
leader_merge_requests 1.2 leader_merge_requests { 1.2 }
instance_merge_requests 0.6 instance_merge_requests { 0.6 }
percentage_merge_requests 50.0 percentage_merge_requests { 50.0 }
leader_ci_pipelines 12.1234 leader_ci_pipelines { 12.1234 }
instance_ci_pipelines 2.344 instance_ci_pipelines { 2.344 }
percentage_ci_pipelines 19.334 percentage_ci_pipelines { 19.334 }
leader_environments 3.3333 leader_environments { 3.3333 }
instance_environments 2.2222 instance_environments { 2.2222 }
percentage_environments 66.672 percentage_environments { 66.672 }
leader_deployments 1.200 leader_deployments { 1.200 }
instance_deployments 0.771 instance_deployments { 0.771 }
percentage_deployments 64.25 percentage_deployments { 64.25 }
leader_projects_prometheus_active 0.111 leader_projects_prometheus_active { 0.111 }
instance_projects_prometheus_active 0.109 instance_projects_prometheus_active { 0.109 }
percentage_projects_prometheus_active 98.198 percentage_projects_prometheus_active { 98.198 }
leader_service_desk_issues 15.891 leader_service_desk_issues { 15.891 }
instance_service_desk_issues 13.345 instance_service_desk_issues { 13.345 }
percentage_service_desk_issues 83.978 percentage_service_desk_issues { 83.978 }
end end
end end
...@@ -6,7 +6,7 @@ FactoryBot.define do ...@@ -6,7 +6,7 @@ FactoryBot.define do
project project
trait :write_access do trait :write_access do
can_push true can_push { true }
end end
end end
end end
...@@ -2,20 +2,20 @@ ...@@ -2,20 +2,20 @@
FactoryBot.define do FactoryBot.define do
factory :deploy_token do factory :deploy_token do
token nil token { nil }
token_encrypted { Gitlab::CryptoHelper.aes256_gcm_encrypt( SecureRandom.hex(50) ) } token_encrypted { Gitlab::CryptoHelper.aes256_gcm_encrypt(SecureRandom.hex(50)) }
sequence(:name) { |n| "PDT #{n}" } sequence(:name) { |n| "PDT #{n}" }
read_repository true read_repository { true }
read_registry true read_registry { true }
revoked false revoked { false }
expires_at { 5.days.from_now } expires_at { 5.days.from_now }
trait :revoked do trait :revoked do
revoked true revoked { true }
end end
trait :gitlab_deploy_token do trait :gitlab_deploy_token do
name DeployToken::GITLAB_DEPLOY_TOKEN_NAME name { DeployToken::GITLAB_DEPLOY_TOKEN_NAME }
end end
trait :expired do trait :expired do
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
FactoryBot.define do FactoryBot.define do
factory :deployment, class: Deployment do factory :deployment, class: Deployment do
sha 'b83d6e391c22777fca1ed3012fce84f633d7fed0' sha { 'b83d6e391c22777fca1ed3012fce84f633d7fed0' }
ref 'master' ref { 'master' }
tag false tag { false }
user nil user { nil }
project nil project { nil }
deployable factory: :ci_build deployable factory: :ci_build
environment factory: :environment environment factory: :environment
...@@ -25,7 +25,7 @@ FactoryBot.define do ...@@ -25,7 +25,7 @@ FactoryBot.define do
trait :review_app do trait :review_app do
sha { TestEnv::BRANCH_SHA['pages-deploy'] } sha { TestEnv::BRANCH_SHA['pages-deploy'] }
ref 'pages-deploy' ref { 'pages-deploy' }
end end
trait :on_cluster do trait :on_cluster do
...@@ -33,21 +33,21 @@ FactoryBot.define do ...@@ -33,21 +33,21 @@ FactoryBot.define do
end end
trait :running do trait :running do
status :running status { :running }
end end
trait :success do trait :success do
status :success status { :success }
finished_at { Time.now } finished_at { Time.now }
end end
trait :failed do trait :failed do
status :failed status { :failed }
finished_at { Time.now } finished_at { Time.now }
end end
trait :canceled do trait :canceled do
status :canceled status { :canceled }
finished_at { Time.now } finished_at { Time.now }
end end
......
...@@ -9,7 +9,7 @@ FactoryBot.define do ...@@ -9,7 +9,7 @@ FactoryBot.define do
trait :with_review_app do |environment| trait :with_review_app do |environment|
transient do transient do
ref 'master' ref { 'master' }
end end
# At this point `review app` is an ephemeral concept related to # At this point `review app` is an ephemeral concept related to
...@@ -41,8 +41,8 @@ FactoryBot.define do ...@@ -41,8 +41,8 @@ FactoryBot.define do
end end
trait :non_playable do trait :non_playable do
status 'created' status { 'created' }
self.when 'manual' self.when { 'manual' }
end end
end end
end end
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
FactoryBot.define do FactoryBot.define do
factory :error_tracking_error, class: Gitlab::ErrorTracking::Error do factory :error_tracking_error, class: Gitlab::ErrorTracking::Error do
id 'id' id { 'id' }
title 'title' title { 'title' }
type 'error' type { 'error' }
user_count 1 user_count { 1 }
count 2 count { 2 }
first_seen { Time.now } first_seen { Time.now }
last_seen { Time.now } last_seen { Time.now }
message 'message' message { 'message' }
culprit 'culprit' culprit { 'culprit' }
external_url 'http://example.com/id' external_url { 'http://example.com/id' }
project_id 'project1' project_id { 'project1' }
project_name 'project name' project_name { 'project name' }
project_slug 'project_name' project_slug { 'project_name' }
short_id 'ID' short_id { 'ID' }
status 'unresolved' status { 'unresolved' }
frequency [] frequency { [] }
skip_create skip_create
end end
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
FactoryBot.define do FactoryBot.define do
factory :error_tracking_project, class: Gitlab::ErrorTracking::Project do factory :error_tracking_project, class: Gitlab::ErrorTracking::Project do
id '1' id { '1' }
name 'Sentry Example' name { 'Sentry Example' }
slug 'sentry-example' slug { 'sentry-example' }
status 'active' status { 'active' }
organization_name 'Sentry' organization_name { 'Sentry' }
organization_id '1' organization_id { '1' }
organization_slug 'sentry' organization_slug { 'sentry' }
skip_create skip_create
end end
......
...@@ -4,19 +4,19 @@ FactoryBot.define do ...@@ -4,19 +4,19 @@ FactoryBot.define do
factory :event do factory :event do
project project
author(factory: :user) { project.creator } author(factory: :user) { project.creator }
action Event::JOINED action { Event::JOINED }
trait(:created) { action Event::CREATED } trait(:created) { action { Event::CREATED } }
trait(:updated) { action Event::UPDATED } trait(:updated) { action { Event::UPDATED } }
trait(:closed) { action Event::CLOSED } trait(:closed) { action { Event::CLOSED } }
trait(:reopened) { action Event::REOPENED } trait(:reopened) { action { Event::REOPENED } }
trait(:pushed) { action Event::PUSHED } trait(:pushed) { action { Event::PUSHED } }
trait(:commented) { action Event::COMMENTED } trait(:commented) { action { Event::COMMENTED } }
trait(:merged) { action Event::MERGED } trait(:merged) { action { Event::MERGED } }
trait(:joined) { action Event::JOINED } trait(:joined) { action { Event::JOINED } }
trait(:left) { action Event::LEFT } trait(:left) { action { Event::LEFT } }
trait(:destroyed) { action Event::DESTROYED } trait(:destroyed) { action { Event::DESTROYED } }
trait(:expired) { action Event::EXPIRED } trait(:expired) { action { Event::EXPIRED } }
factory :closed_issue_event do factory :closed_issue_event do
action { Event::CLOSED } action { Event::CLOSED }
...@@ -27,15 +27,15 @@ FactoryBot.define do ...@@ -27,15 +27,15 @@ FactoryBot.define do
factory :push_event, class: PushEvent do factory :push_event, class: PushEvent do
project factory: :project_empty_repo project factory: :project_empty_repo
author(factory: :user) { project.creator } author(factory: :user) { project.creator }
action Event::PUSHED action { Event::PUSHED }
end end
factory :push_event_payload do factory :push_event_payload do
event event
commit_count 1 commit_count { 1 }
action :pushed action { :pushed }
ref_type :branch ref_type { :branch }
ref 'master' ref { 'master' }
commit_to '3cdce97ed87c91368561584e7358f4d46e3e173c' commit_to { '3cdce97ed87c91368561584e7358f4d46e3e173c' }
end end
end end
...@@ -4,14 +4,14 @@ FactoryBot.define do ...@@ -4,14 +4,14 @@ FactoryBot.define do
factory :external_pull_request do factory :external_pull_request do
sequence(:pull_request_iid) sequence(:pull_request_iid)
project project
source_branch 'feature' source_branch { 'feature' }
source_repository 'the-repository' source_repository { 'the-repository' }
source_sha '97de212e80737a608d939f648d959671fb0a0142' source_sha { '97de212e80737a608d939f648d959671fb0a0142' }
target_branch 'master' target_branch { 'master' }
target_repository 'the-repository' target_repository { 'the-repository' }
target_sha 'a09386439ca39abe575675ffd4b89ae824fec22f' target_sha { 'a09386439ca39abe575675ffd4b89ae824fec22f' }
status :open status { :open }
trait(:closed) { status 'closed' } trait(:closed) { status { 'closed'} }
end end
end end
...@@ -5,7 +5,7 @@ FactoryBot.define do ...@@ -5,7 +5,7 @@ FactoryBot.define do
skip_create skip_create
project project
secret nil secret { nil }
transient do transient do
fixture { 'rails_sample.jpg' } fixture { 'rails_sample.jpg' }
......
...@@ -6,6 +6,6 @@ FactoryBot.define do ...@@ -6,6 +6,6 @@ FactoryBot.define do
project project
gpg_key gpg_key
gpg_key_primary_keyid { gpg_key.keyid } gpg_key_primary_keyid { gpg_key.keyid }
verification_status :verified verification_status { :verified }
end end
end end
...@@ -6,23 +6,23 @@ FactoryBot.define do ...@@ -6,23 +6,23 @@ FactoryBot.define do
group group
user user
trait(:guest) { access_level GroupMember::GUEST } trait(:guest) { access_level { GroupMember::GUEST } }
trait(:reporter) { access_level GroupMember::REPORTER } trait(:reporter) { access_level { GroupMember::REPORTER } }
trait(:developer) { access_level GroupMember::DEVELOPER } trait(:developer) { access_level { GroupMember::DEVELOPER } }
trait(:maintainer) { access_level GroupMember::MAINTAINER } trait(:maintainer) { access_level { GroupMember::MAINTAINER } }
trait(:owner) { access_level GroupMember::OWNER } trait(:owner) { access_level { GroupMember::OWNER } }
trait(:access_request) { requested_at { Time.now } } trait(:access_request) { requested_at { Time.now } }
trait(:invited) do trait(:invited) do
user_id nil user_id { nil }
invite_token 'xxx' invite_token { 'xxx' }
sequence :invite_email do |n| sequence :invite_email do |n|
"email#{n}@email.com" "email#{n}@email.com"
end end
end end
trait(:ldap) do trait(:ldap) do
ldap true ldap { true }
end end
trait :blocked do trait :blocked do
......
...@@ -4,9 +4,9 @@ FactoryBot.define do ...@@ -4,9 +4,9 @@ FactoryBot.define do
factory :group, class: Group, parent: :namespace do factory :group, class: Group, parent: :namespace do
sequence(:name) { |n| "group#{n}" } sequence(:name) { |n| "group#{n}" }
path { name.downcase.gsub(/\s/, '_') } path { name.downcase.gsub(/\s/, '_') }
type 'Group' type { 'Group' }
owner nil owner { nil }
project_creation_level ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS project_creation_level { ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS}
after(:create) do |group| after(:create) do |group|
if group.owner if group.owner
...@@ -17,15 +17,15 @@ FactoryBot.define do ...@@ -17,15 +17,15 @@ FactoryBot.define do
end end
trait :public do trait :public do
visibility_level Gitlab::VisibilityLevel::PUBLIC visibility_level { Gitlab::VisibilityLevel::PUBLIC}
end end
trait :internal do trait :internal do
visibility_level Gitlab::VisibilityLevel::INTERNAL visibility_level {Gitlab::VisibilityLevel::INTERNAL}
end end
trait :private do trait :private do
visibility_level Gitlab::VisibilityLevel::PRIVATE visibility_level { Gitlab::VisibilityLevel::PRIVATE}
end end
trait :with_avatar do trait :with_avatar do
...@@ -33,7 +33,7 @@ FactoryBot.define do ...@@ -33,7 +33,7 @@ FactoryBot.define do
end end
trait :access_requestable do trait :access_requestable do
request_access_enabled true request_access_enabled { true }
end end
trait :nested do trait :nested do
...@@ -41,15 +41,15 @@ FactoryBot.define do ...@@ -41,15 +41,15 @@ FactoryBot.define do
end end
trait :auto_devops_enabled do trait :auto_devops_enabled do
auto_devops_enabled true auto_devops_enabled { true }
end end
trait :auto_devops_disabled do trait :auto_devops_disabled do
auto_devops_enabled false auto_devops_enabled { false }
end end
trait :owner_subgroup_creation_only do trait :owner_subgroup_creation_only do
subgroup_creation_level ::Gitlab::Access::OWNER_SUBGROUP_ACCESS subgroup_creation_level { ::Gitlab::Access::OWNER_SUBGROUP_ACCESS}
end end
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
FactoryBot.define do FactoryBot.define do
factory :identity do factory :identity do
provider 'ldapmain' provider { 'ldapmain' }
extern_uid 'my-ldap-id' extern_uid { 'my-ldap-id' }
end end
end end
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
FactoryBot.define do FactoryBot.define do
factory :import_state, class: ProjectImportState do factory :import_state, class: ProjectImportState do
status :none status { :none }
association :project, factory: :project association :project, factory: :project
transient do transient do
import_url { generate(:url) } import_url { generate(:url) }
import_type nil import_type { nil }
end end
trait :repository do trait :repository do
...@@ -15,23 +15,23 @@ FactoryBot.define do ...@@ -15,23 +15,23 @@ FactoryBot.define do
end end
trait :none do trait :none do
status :none status { :none }
end end
trait :scheduled do trait :scheduled do
status :scheduled status { :scheduled }
end end
trait :started do trait :started do
status :started status { :started }
end end
trait :finished do trait :finished do
status :finished status { :finished }
end end
trait :failed do trait :failed do
status :failed status { :failed }
end end
after(:create) do |import_state, evaluator| after(:create) do |import_state, evaluator|
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
FactoryBot.define do FactoryBot.define do
factory :internal_id do factory :internal_id do
project project
usage :issues usage { :issues }
last_value { project.issues.maximum(:iid) || 0 } last_value { project.issues.maximum(:iid) || 0 }
end end
end end
...@@ -8,19 +8,19 @@ FactoryBot.define do ...@@ -8,19 +8,19 @@ FactoryBot.define do
updated_by { author } updated_by { author }
trait :confidential do trait :confidential do
confidential true confidential { true }
end end
trait :opened do trait :opened do
state :opened state { :opened }
end end
trait :locked do trait :locked do
discussion_locked true discussion_locked { true }
end end
trait :closed do trait :closed do
state :closed state { :closed }
closed_at { Time.now } closed_at { Time.now }
end end
...@@ -29,7 +29,7 @@ FactoryBot.define do ...@@ -29,7 +29,7 @@ FactoryBot.define do
factory :labeled_issue do factory :labeled_issue do
transient do transient do
labels [] labels { [] }
end end
after(:create) do |issue, evaluator| after(:create) do |issue, evaluator|
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
FactoryBot.define do FactoryBot.define do
trait :base_label do trait :base_label do
title { generate(:label_title) } title { generate(:label_title) }
color "#990000" color { "#990000" }
end end
factory :label, traits: [:base_label], class: ProjectLabel do factory :label, traits: [:base_label], class: ProjectLabel do
project project
transient do transient do
priority nil priority { nil }
end end
after(:create) do |label, evaluator| after(:create) do |label, evaluator|
......
...@@ -4,6 +4,6 @@ FactoryBot.define do ...@@ -4,6 +4,6 @@ FactoryBot.define do
factory :lfs_file_lock do factory :lfs_file_lock do
user user
project project
path 'README.md' path { 'README.md' }
end end
end end
...@@ -5,7 +5,7 @@ include ActionDispatch::TestProcess ...@@ -5,7 +5,7 @@ include ActionDispatch::TestProcess
FactoryBot.define do FactoryBot.define do
factory :lfs_object do factory :lfs_object do
sequence(:oid) { |n| "b68143e6463773b1b6c6fd009a76c32aeec041faff32ba2ed42fd7f708a%05x" % n } sequence(:oid) { |n| "b68143e6463773b1b6c6fd009a76c32aeec041faff32ba2ed42fd7f708a%05x" % n }
size 499013 size { 499013 }
end end
trait :with_file do trait :with_file do
...@@ -15,8 +15,8 @@ FactoryBot.define do ...@@ -15,8 +15,8 @@ FactoryBot.define do
# The uniqueness constraint means we can't use the correct OID for all LFS # The uniqueness constraint means we can't use the correct OID for all LFS
# objects, so the test needs to decide which (if any) object gets it # objects, so the test needs to decide which (if any) object gets it
trait :correct_oid do trait :correct_oid do
oid 'b804383982bb89b00e828e3f44c038cc991d3d1768009fc39ba8e2c081b9fb75' oid { 'b804383982bb89b00e828e3f44c038cc991d3d1768009fc39ba8e2c081b9fb75' }
size 1062 size { 1062 }
end end
trait :object_storage do trait :object_storage do
......
...@@ -4,6 +4,6 @@ FactoryBot.define do ...@@ -4,6 +4,6 @@ FactoryBot.define do
factory :lfs_objects_project do factory :lfs_objects_project do
lfs_object lfs_object
project project
repository_type :project repository_type { :project }
end end
end end
...@@ -4,19 +4,19 @@ FactoryBot.define do ...@@ -4,19 +4,19 @@ FactoryBot.define do
factory :list do factory :list do
board board
label label
list_type :label list_type { :label }
sequence(:position) sequence(:position)
end end
factory :backlog_list, parent: :list do factory :backlog_list, parent: :list do
list_type :backlog list_type { :backlog }
label nil label { nil }
position nil position { nil }
end end
factory :closed_list, parent: :list do factory :closed_list, parent: :list do
list_type :closed list_type { :closed }
label nil label { nil }
position nil position { nil }
end end
end end
...@@ -4,44 +4,44 @@ FactoryBot.define do ...@@ -4,44 +4,44 @@ FactoryBot.define do
factory :merge_request_diff_file do factory :merge_request_diff_file do
association :merge_request_diff association :merge_request_diff
relative_order 0 relative_order { 0 }
new_file true new_file { true }
renamed_file false renamed_file { false }
deleted_file false deleted_file { false }
too_large false too_large { false }
a_mode 0 a_mode { 0 }
b_mode 100644 b_mode { 100644 }
new_path 'foo' new_path { 'foo' }
old_path 'foo' old_path { 'foo' }
diff '' diff { '' }
binary false binary { false }
trait :new_file do trait :new_file do
relative_order 0 relative_order { 0 }
new_file true new_file { true }
renamed_file false renamed_file { false }
deleted_file false deleted_file { false }
too_large false too_large { false }
a_mode 0 a_mode { 0 }
b_mode 100644 b_mode { 100644 }
new_path 'foo' new_path { 'foo' }
old_path 'foo' old_path { 'foo' }
diff '' diff { '' }
binary false binary { false }
end end
trait :renamed_file do trait :renamed_file do
relative_order 662 relative_order { 662 }
new_file false new_file { false }
renamed_file true renamed_file { true }
deleted_file false deleted_file { false }
too_large false too_large { false }
a_mode 100644 a_mode { 100644 }
b_mode 100644 b_mode { 100644 }
new_path 'bar' new_path { 'bar' }
old_path 'baz' old_path { 'baz' }
diff '' diff { '' }
binary false binary { false }
end end
end end
end end
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
FactoryBot.define do FactoryBot.define do
factory :merge_request_diff do factory :merge_request_diff do
association :merge_request association :merge_request
state :collected state { :collected }
commits_count 1 commits_count { 1 }
base_commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) } base_commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) }
head_commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) } head_commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) }
......
...@@ -16,36 +16,36 @@ FactoryBot.define do ...@@ -16,36 +16,36 @@ FactoryBot.define do
# #
# See also RepoHelpers.sample_compare # See also RepoHelpers.sample_compare
# #
source_branch "master" source_branch { "master" }
target_branch "feature" target_branch { "feature" }
merge_status "can_be_merged" merge_status { "can_be_merged" }
trait :with_diffs do trait :with_diffs do
end end
trait :with_image_diffs do trait :with_image_diffs do
source_branch "add_images_and_changes" source_branch { "add_images_and_changes" }
target_branch "master" target_branch { "master" }
end end
trait :without_diffs do trait :without_diffs do
source_branch "improve/awesome" source_branch { "improve/awesome" }
target_branch "master" target_branch { "master" }
end end
trait :conflict do trait :conflict do
source_branch "feature_conflict" source_branch { "feature_conflict" }
target_branch "feature" target_branch { "feature" }
end end
trait :merged do trait :merged do
state :merged state { :merged }
end end
trait :merged_target do trait :merged_target do
source_branch "merged-target" source_branch { "merged-target" }
target_branch "improve/awesome" target_branch { "improve/awesome" }
end end
trait :merged_last_month do trait :merged_last_month do
...@@ -57,7 +57,7 @@ FactoryBot.define do ...@@ -57,7 +57,7 @@ FactoryBot.define do
end end
trait :closed do trait :closed do
state :closed state { :closed }
end end
trait :closed_last_month do trait :closed_last_month do
...@@ -69,36 +69,36 @@ FactoryBot.define do ...@@ -69,36 +69,36 @@ FactoryBot.define do
end end
trait :opened do trait :opened do
state :opened state { :opened }
end end
trait :invalid do trait :invalid do
source_branch "feature_one" source_branch { "feature_one" }
target_branch "feature_two" target_branch { "feature_two" }
end end
trait :locked do trait :locked do
state :locked state { :locked }
end end
trait :simple do trait :simple do
source_branch "feature" source_branch { "feature" }
target_branch "master" target_branch { "master" }
end end
trait :rebased do trait :rebased do
source_branch "markdown" source_branch { "markdown" }
target_branch "improve/awesome" target_branch { "improve/awesome" }
end end
trait :diverged do trait :diverged do
source_branch "feature" source_branch { "feature" }
target_branch "master" target_branch { "master" }
end end
trait :merge_when_pipeline_succeeds do trait :merge_when_pipeline_succeeds do
auto_merge_enabled true auto_merge_enabled { true }
auto_merge_strategy AutoMergeService::STRATEGY_MERGE_WHEN_PIPELINE_SUCCEEDS auto_merge_strategy { AutoMergeService::STRATEGY_MERGE_WHEN_PIPELINE_SUCCEEDS }
merge_user { author } merge_user { author }
end end
...@@ -162,7 +162,7 @@ FactoryBot.define do ...@@ -162,7 +162,7 @@ FactoryBot.define do
end end
trait :deployed_review_app do trait :deployed_review_app do
target_branch 'pages-deploy-target' target_branch { 'pages-deploy-target' }
transient do transient do
deployment { create(:deployment, :review_app) } deployment { create(:deployment, :review_app) }
...@@ -203,7 +203,7 @@ FactoryBot.define do ...@@ -203,7 +203,7 @@ FactoryBot.define do
factory :labeled_merge_request do factory :labeled_merge_request do
transient do transient do
labels [] labels { [] }
end end
after(:create) do |merge_request, evaluator| after(:create) do |merge_request, evaluator|
......
...@@ -5,19 +5,19 @@ FactoryBot.define do ...@@ -5,19 +5,19 @@ FactoryBot.define do
title title
transient do transient do
project nil project { nil }
group nil group { nil }
project_id nil project_id { nil }
group_id nil group_id { nil }
parent nil parent { nil }
end end
trait :active do trait :active do
state "active" state { "active" }
end end
trait :closed do trait :closed do
state "closed" state { "closed" }
end end
trait :with_dates do trait :with_dates do
......
...@@ -41,14 +41,14 @@ FactoryBot.define do ...@@ -41,14 +41,14 @@ FactoryBot.define do
factory :legacy_diff_note_on_merge_request, traits: [:on_merge_request, :legacy_diff_note], class: LegacyDiffNote do factory :legacy_diff_note_on_merge_request, traits: [:on_merge_request, :legacy_diff_note], class: LegacyDiffNote do
association :project, :repository association :project, :repository
position '' position { '' }
end end
factory :diff_note_on_merge_request, traits: [:on_merge_request], class: DiffNote do factory :diff_note_on_merge_request, traits: [:on_merge_request], class: DiffNote do
association :project, :repository association :project, :repository
transient do transient do
line_number 14 line_number { 14 }
diff_refs { noteable.try(:diff_refs) } diff_refs { noteable.try(:diff_refs) }
end end
...@@ -87,7 +87,7 @@ FactoryBot.define do ...@@ -87,7 +87,7 @@ FactoryBot.define do
association :project, :repository association :project, :repository
transient do transient do
line_number 14 line_number { 14 }
diff_refs { project.commit(commit_id).try(:diff_refs) } diff_refs { project.commit(commit_id).try(:diff_refs) }
end end
...@@ -104,14 +104,14 @@ FactoryBot.define do ...@@ -104,14 +104,14 @@ FactoryBot.define do
trait :on_commit do trait :on_commit do
association :project, :repository association :project, :repository
noteable nil noteable { nil }
noteable_type 'Commit' noteable_type { 'Commit' }
noteable_id nil noteable_id { nil }
commit_id { RepoHelpers.sample_commit.id } commit_id { RepoHelpers.sample_commit.id }
end end
trait :legacy_diff_note do trait :legacy_diff_note do
line_code "0_184_184" line_code { "0_184_184" }
end end
trait :on_issue do trait :on_issue do
...@@ -132,19 +132,19 @@ FactoryBot.define do ...@@ -132,19 +132,19 @@ FactoryBot.define do
trait :on_personal_snippet do trait :on_personal_snippet do
noteable { create(:personal_snippet) } noteable { create(:personal_snippet) }
project nil project { nil }
end end
trait :system do trait :system do
system true system { true }
end end
trait :downvote do trait :downvote do
note "thumbsdown" note { "thumbsdown" }
end end
trait :upvote do trait :upvote do
note "thumbsup" note { "thumbsup" }
end end
trait :with_attachment do trait :with_attachment do
...@@ -156,7 +156,7 @@ FactoryBot.define do ...@@ -156,7 +156,7 @@ FactoryBot.define do
end end
transient do transient do
in_reply_to nil in_reply_to { nil }
end end
before(:create) do |note, evaluator| before(:create) do |note, evaluator|
......
...@@ -4,6 +4,6 @@ FactoryBot.define do ...@@ -4,6 +4,6 @@ FactoryBot.define do
factory :notification_setting do factory :notification_setting do
source factory: :project source factory: :project
user user
level 3 level { 3 }
end end
end end
...@@ -6,6 +6,6 @@ FactoryBot.define do ...@@ -6,6 +6,6 @@ FactoryBot.define do
uid { Doorkeeper::OAuth::Helpers::UniqueToken.generate } uid { Doorkeeper::OAuth::Helpers::UniqueToken.generate }
redirect_uri { generate(:url) } redirect_uri { generate(:url) }
owner owner
owner_type 'User' owner_type { 'User' }
end end
end end
...@@ -6,7 +6,8 @@ FactoryBot.define do ...@@ -6,7 +6,8 @@ FactoryBot.define do
verified_at { Time.now } verified_at { Time.now }
enabled_until { 1.week.from_now } enabled_until { 1.week.from_now }
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIICGzCCAYSgAwIBAgIBATANBgkqhkiG9w0BAQUFADAbMRkwFwYDVQQDExB0ZXN0 MIICGzCCAYSgAwIBAgIBATANBgkqhkiG9w0BAQUFADAbMRkwFwYDVQQDExB0ZXN0
LWNlcnRpZmljYXRlMB4XDTE2MDIxMjE0MzIwMFoXDTIwMDQxMjE0MzIwMFowGzEZ LWNlcnRpZmljYXRlMB4XDTE2MDIxMjE0MzIwMFoXDTIwMDQxMjE0MzIwMFowGzEZ
MBcGA1UEAxMQdGVzdC1jZXJ0aWZpY2F0ZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw MBcGA1UEAxMQdGVzdC1jZXJ0aWZpY2F0ZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
...@@ -20,8 +21,10 @@ joZp2JHYvNlTPkRJ/J4TcXxBTJmArcQgTIuNoBtC+0A/SwdK4MfTCUY4vNWNdese ...@@ -20,8 +21,10 @@ joZp2JHYvNlTPkRJ/J4TcXxBTJmArcQgTIuNoBtC+0A/SwdK4MfTCUY4vNWNdese
5A4K65Nb7Oh1AdQieTBHNXXCdyFsva9/ScfQGEl7p55a52jOPs0StPd7g64uvjlg 5A4K65Nb7Oh1AdQieTBHNXXCdyFsva9/ScfQGEl7p55a52jOPs0StPd7g64uvjlg
YHi2yesCrOvVXt+lgPTd YHi2yesCrOvVXt+lgPTd
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
key '-----BEGIN PRIVATE KEY----- key do
'-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKS+CfS9GcRSdYSN MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKS+CfS9GcRSdYSN
SzyH5QJQBr5umRL6E+KilOV39iYFO/9oHjUdapTRWkrwnNPCp7qaeck4Jr8iv14t SzyH5QJQBr5umRL6E+KilOV39iYFO/9oHjUdapTRWkrwnNPCp7qaeck4Jr8iv14t
PVNDfNr76eGb6/3YknOAP0QOjLWunoC8kjU+N/JHU52NrUeX3qEy8EKV9LeCDJcB PVNDfNr76eGb6/3YknOAP0QOjLWunoC8kjU+N/JHU52NrUeX3qEy8EKV9LeCDJcB
...@@ -37,10 +40,11 @@ EPjGlXIT+aW2XiPmK3ZlCDcWIenE+lmtbOpI159Wpk8BGXs/s/xBAkEAlAY3ymgx ...@@ -37,10 +40,11 @@ EPjGlXIT+aW2XiPmK3ZlCDcWIenE+lmtbOpI159Wpk8BGXs/s/xBAkEAlAY3ymgx
63BDJEwvOb2IaP8lDDxNsXx9XJNVvQbv5n15vNsLHbjslHfAhAbxnLQ1fLhUPqSi 63BDJEwvOb2IaP8lDDxNsXx9XJNVvQbv5n15vNsLHbjslHfAhAbxnLQ1fLhUPqSi
nNp/xedE1YxutQ== nNp/xedE1YxutQ==
-----END PRIVATE KEY-----' -----END PRIVATE KEY-----'
end
trait :disabled do trait :disabled do
verified_at nil verified_at { nil }
enabled_until nil enabled_until { nil }
end end
trait :scheduled_for_removal do trait :scheduled_for_removal do
...@@ -52,7 +56,7 @@ nNp/xedE1YxutQ== ...@@ -52,7 +56,7 @@ nNp/xedE1YxutQ==
end end
trait :unverified do trait :unverified do
verified_at nil verified_at { nil }
end end
trait :reverify do trait :reverify do
...@@ -64,17 +68,18 @@ nNp/xedE1YxutQ== ...@@ -64,17 +68,18 @@ nNp/xedE1YxutQ==
end end
trait :without_certificate do trait :without_certificate do
certificate nil certificate { nil }
end end
trait :without_key do trait :without_key do
key nil key { nil }
end end
trait :with_missing_chain do trait :with_missing_chain do
# This certificate is signed with different key # This certificate is signed with different key
# And misses the CA to build trust chain # And misses the CA to build trust chain
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIIDGTCCAgGgAwIBAgIBAjANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwdUZXN0 MIIDGTCCAgGgAwIBAgIBAjANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwdUZXN0
IENBMB4XDTE2MDIxMjE0MjMwMFoXDTE3MDIxMTE0MjMwMFowHTEbMBkGA1UEAxMS IENBMB4XDTE2MDIxMjE0MjMwMFoXDTE3MDIxMTE0MjMwMFowHTEbMBkGA1UEAxMS
dGVzdC1jZXJ0aWZpY2F0ZS0yMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC dGVzdC1jZXJ0aWZpY2F0ZS0yMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
...@@ -93,13 +98,15 @@ WlU8raZoPIqf6H/8JA97pM/nk/3CqCoHsouSQv+jGY4pSL22RqsO0ylIM0LDBbmF ...@@ -93,13 +98,15 @@ WlU8raZoPIqf6H/8JA97pM/nk/3CqCoHsouSQv+jGY4pSL22RqsO0ylIM0LDBbmF
m4AEaojTljX1tMJAF9Rbiw/omam5bDPq2JWtosrz/zB69y5FaQjc6FnCk0M4oN/+ m4AEaojTljX1tMJAF9Rbiw/omam5bDPq2JWtosrz/zB69y5FaQjc6FnCk0M4oN/+
VM+d42lQAgoq318A84Xu5vRh1KCAJuztkhNbM+w= VM+d42lQAgoq318A84Xu5vRh1KCAJuztkhNbM+w=
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
end end
trait :with_trusted_chain do trait :with_trusted_chain do
# This contains # This contains
# [Intermediate #2 (SHA-2)] 'Comodo RSA Domain Validation Secure Server CA' # [Intermediate #2 (SHA-2)] 'Comodo RSA Domain Validation Secure Server CA'
# [Intermediate #1 (SHA-2)] 'COMODO RSA Certification Authority' # [Intermediate #1 (SHA-2)] 'COMODO RSA Certification Authority'
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
...@@ -166,13 +173,15 @@ B5a6SE2Q8pTIqXOi6wZ7I53eovNNVZ96YUWYGGjHXkBrI/V5eu+MtWuLt29G9Hvx ...@@ -166,13 +173,15 @@ B5a6SE2Q8pTIqXOi6wZ7I53eovNNVZ96YUWYGGjHXkBrI/V5eu+MtWuLt29G9Hvx
PUsE2JOAWVrgQSQdso8VYFhH2+9uRv0V9dlfmrPb2LjkQLPNlzmuhbsdjrzch5vR PUsE2JOAWVrgQSQdso8VYFhH2+9uRv0V9dlfmrPb2LjkQLPNlzmuhbsdjrzch5vR
pu/xO28QOG8= pu/xO28QOG8=
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
end end
trait :with_trusted_expired_chain do trait :with_trusted_expired_chain do
# This contains # This contains
# Let's Encrypt Authority X3 # Let's Encrypt Authority X3
# DST Root CA X3 # DST Root CA X3
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIIFSjCCBDKgAwIBAgISAw24xGWrFotvTBa6AZI/pzq1MA0GCSqGSIb3DQEBCwUA MIIFSjCCBDKgAwIBAgISAw24xGWrFotvTBa6AZI/pzq1MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTAzMDcxNzU5NTZaFw0x ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTAzMDcxNzU5NTZaFw0x
...@@ -250,10 +259,12 @@ R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5 ...@@ -250,10 +259,12 @@ R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
end end
trait :with_expired_certificate do trait :with_expired_certificate do
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIIBsDCCARmgAwIBAgIBATANBgkqhkiG9w0BAQUFADAeMRwwGgYDVQQDExNleHBp MIIBsDCCARmgAwIBAgIBATANBgkqhkiG9w0BAQUFADAeMRwwGgYDVQQDExNleHBp
cmVkLWNlcnRpZmljYXRlMB4XDTE1MDIxMjE0MzMwMFoXDTE2MDIwMTE0MzMwMFow cmVkLWNlcnRpZmljYXRlMB4XDTE1MDIxMjE0MzMwMFoXDTE2MDIwMTE0MzMwMFow
HjEcMBoGA1UEAxMTZXhwaXJlZC1jZXJ0aWZpY2F0ZTCBnzANBgkqhkiG9w0BAQEF HjEcMBoGA1UEAxMTZXhwaXJlZC1jZXJ0aWZpY2F0ZTCBnzANBgkqhkiG9w0BAQEF
...@@ -265,6 +276,7 @@ Hq9LkWn6WP4EHsesHyslgTQZF8C7kVLTbLn2noLnOE+Mp3vcWlZxl3Yk6aZMhKS+ ...@@ -265,6 +276,7 @@ Hq9LkWn6WP4EHsesHyslgTQZF8C7kVLTbLn2noLnOE+Mp3vcWlZxl3Yk6aZMhKS+
Iy6oRpHaCF/2obZdIdgf9rlyz0fkqyHJc9GkioSoOhJZxEV2SgAkap8yS0sX2tJ9 Iy6oRpHaCF/2obZdIdgf9rlyz0fkqyHJc9GkioSoOhJZxEV2SgAkap8yS0sX2tJ9
ZDXgrA== ZDXgrA==
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
end end
trait :letsencrypt do trait :letsencrypt do
...@@ -273,7 +285,8 @@ ZDXgrA== ...@@ -273,7 +285,8 @@ ZDXgrA==
end end
trait :explicit_ecdsa do trait :explicit_ecdsa do
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIID1zCCAzkCCQDatOIwBlktwjAKBggqhkjOPQQDAjBPMQswCQYDVQQGEwJVUzEL MIID1zCCAzkCCQDatOIwBlktwjAKBggqhkjOPQQDAjBPMQswCQYDVQQGEwJVUzEL
MAkGA1UECAwCTlkxCzAJBgNVBAcMAk5ZMQswCQYDVQQLDAJJVDEZMBcGA1UEAwwQ MAkGA1UECAwCTlkxCzAJBgNVBAcMAk5ZMQswCQYDVQQLDAJJVDEZMBcGA1UEAwwQ
dGVzdC1jZXJ0aWZpY2F0ZTAeFw0xOTA4MjkxMTE1NDBaFw0yMTA4MjgxMTE1NDBa dGVzdC1jZXJ0aWZpY2F0ZTAeFw0xOTA4MjkxMTE1NDBaFw0yMTA4MjgxMTE1NDBa
...@@ -296,8 +309,10 @@ OjSJpIDdFWGVYJHyMDI5WgQyhm4hAioXJ0T22Zab8Wmq+hBYRJNcHoaV894blfqR ...@@ -296,8 +309,10 @@ OjSJpIDdFWGVYJHyMDI5WgQyhm4hAioXJ0T22Zab8Wmq+hBYRJNcHoaV894blfqR
V3ZJgam8EQJCAcnPpJQ0IqoT1pAQkaL3+Ka8ZaaCd6/8RnoDtGvWljisuyH65SRu V3ZJgam8EQJCAcnPpJQ0IqoT1pAQkaL3+Ka8ZaaCd6/8RnoDtGvWljisuyH65SRu
kmYv87bZe1KqOZDoaDBdfVsoxcGbik19lBPV kmYv87bZe1KqOZDoaDBdfVsoxcGbik19lBPV
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
key '-----BEGIN EC PARAMETERS----- key do
'-----BEGIN EC PARAMETERS-----
MIIBwgIBATBNBgcqhkjOPQEBAkIB//////////////////////////////////// MIIBwgIBATBNBgcqhkjOPQEBAkIB////////////////////////////////////
//////////////////////////////////////////////////8wgZ4EQgH///// //////////////////////////////////////////////////8wgZ4EQgH/////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
...@@ -326,10 +341,12 @@ ZAkCAQGhgYkDgYYABAFUb/hz+GCXfq2geP54Yvimq/uXsz5kpAni/PRj0TrEjH6C ...@@ -326,10 +341,12 @@ ZAkCAQGhgYkDgYYABAFUb/hz+GCXfq2geP54Yvimq/uXsz5kpAni/PRj0TrEjH6C
+Iu6YSMSWFwExlVeJeFvm3F/XW5cBafmfpCF7Llgo8w2MsuoOpobX158IsJ3bUDR +Iu6YSMSWFwExlVeJeFvm3F/XW5cBafmfpCF7Llgo8w2MsuoOpobX158IsJ3bUDR
Nw== Nw==
-----END EC PRIVATE KEY-----' -----END EC PRIVATE KEY-----'
end
end end
trait :ecdsa do trait :ecdsa do
certificate '-----BEGIN CERTIFICATE----- certificate do
'-----BEGIN CERTIFICATE-----
MIIB8zCCAVUCCQCGKuPQ6SBxUTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJVUzEL MIIB8zCCAVUCCQCGKuPQ6SBxUTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJVUzEL
MAkGA1UECAwCVVMxCzAJBgNVBAcMAlVTMRUwEwYDVQQDDAxzaHVzaGxpbi5kZXYw MAkGA1UECAwCVVMxCzAJBgNVBAcMAlVTMRUwEwYDVQQDDAxzaHVzaGxpbi5kZXYw
HhcNMTkwOTAyMDkyMDUxWhcNMjEwOTAxMDkyMDUxWjA+MQswCQYDVQQGEwJVUzEL HhcNMTkwOTAyMDkyMDUxWhcNMjEwOTAxMDkyMDUxWjA+MQswCQYDVQQGEwJVUzEL
...@@ -342,8 +359,10 @@ R9WYUg5+PQMg7kS+4K/5+5gonWCvaMcP+2P7hltUcvq41l3uMKKCZRU/x60/FMHc ...@@ -342,8 +359,10 @@ R9WYUg5+PQMg7kS+4K/5+5gonWCvaMcP+2P7hltUcvq41l3uMKKCZRU/x60/FMHc
1ZXdAkIBuVtm9RJXziNOKS4TcpH9os/FuREW8YQlpec58LDZdlivcHnikHZ4LCri 1ZXdAkIBuVtm9RJXziNOKS4TcpH9os/FuREW8YQlpec58LDZdlivcHnikHZ4LCri
T7zu3VY6Rq+V/IKpsQwQjmoTJ0IpCM8= T7zu3VY6Rq+V/IKpsQwQjmoTJ0IpCM8=
-----END CERTIFICATE-----' -----END CERTIFICATE-----'
end
key '-----BEGIN EC PARAMETERS----- key do
'-----BEGIN EC PARAMETERS-----
BgUrgQQAIw== BgUrgQQAIw==
-----END EC PARAMETERS----- -----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY----- -----BEGIN EC PRIVATE KEY-----
...@@ -353,6 +372,7 @@ dNqyCW1lFsgyt6KHJw6H8bhNemSny1O0Sy4P6yHxq7cnLCyLz1FJnq+BWgJjv/8N ...@@ -353,6 +372,7 @@ dNqyCW1lFsgyt6KHJw6H8bhNemSny1O0Sy4P6yHxq7cnLCyLz1FJnq+BWgJjv/8N
Da9qZifIFmpsv5xNAGxDvANQRpLI/RHc/hvo7HfjuljNfBJ1I6tr0KbhMxB76mtU Da9qZifIFmpsv5xNAGxDvANQRpLI/RHc/hvo7HfjuljNfBJ1I6tr0KbhMxB76mtU
x6zG6WoibsbsJMj70nwseUnPTBQNDP+j61RJjC/r x6zG6WoibsbsJMj70nwseUnPTBQNDP+j61RJjC/r
-----END EC PRIVATE KEY-----' -----END EC PRIVATE KEY-----'
end
end end
end end
end end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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