diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-21 06:07:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-21 06:07:37 +0300 |
commit | bc3e57199e52e45799cb4d47ee2630af40d1edc3 (patch) | |
tree | ecf9aab2b81f91f857d4d116fbf4448675c7a2d8 /spec/lib | |
parent | bb348db4c22bf58ac685fcd66445ac172491b302 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
4 files changed, 11 insertions, 5 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb index 4e63f60ea6b..90f4b06cea0 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb @@ -3,8 +3,13 @@ require 'spec_helper' describe Gitlab::Ci::Pipeline::Seed::Deployment do - let_it_be(:project) { create(:project) } - let(:job) { build(:ci_build, project: project) } + let_it_be(:project) { create(:project, :repository) } + let(:pipeline) do + create(:ci_pipeline, project: project, + sha: 'b83d6e391c22777fca1ed3012fce84f633d7fed0') + end + + let(:job) { build(:ci_build, project: project, pipeline: pipeline) } let(:seed) { described_class.new(job) } let(:attributes) { {} } diff --git a/spec/lib/gitlab/prometheus/queries/additional_metrics_deployment_query_spec.rb b/spec/lib/gitlab/prometheus/queries/additional_metrics_deployment_query_spec.rb index 4bdc57c8c04..15edc649702 100644 --- a/spec/lib/gitlab/prometheus/queries/additional_metrics_deployment_query_spec.rb +++ b/spec/lib/gitlab/prometheus/queries/additional_metrics_deployment_query_spec.rb @@ -8,7 +8,8 @@ describe Gitlab::Prometheus::Queries::AdditionalMetricsDeploymentQuery do end include_examples 'additional metrics query' do - let(:deployment) { create(:deployment, environment: environment) } + let(:project) { create(:project, :repository) } + let(:deployment) { create(:deployment, environment: environment, project: project) } let(:query_params) { [deployment.id] } it 'queries using specific time' do diff --git a/spec/lib/gitlab/slash_commands/command_spec.rb b/spec/lib/gitlab/slash_commands/command_spec.rb index 73b93589fac..9849cf78b2f 100644 --- a/spec/lib/gitlab/slash_commands/command_spec.rb +++ b/spec/lib/gitlab/slash_commands/command_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Gitlab::SlashCommands::Command do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:chat_name) { double(:chat_name, user: user) } diff --git a/spec/lib/gitlab/slash_commands/deploy_spec.rb b/spec/lib/gitlab/slash_commands/deploy_spec.rb index 93a724d8e12..fb9969800a2 100644 --- a/spec/lib/gitlab/slash_commands/deploy_spec.rb +++ b/spec/lib/gitlab/slash_commands/deploy_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Gitlab::SlashCommands::Deploy do describe '#execute' do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:chat_name) { double(:chat_name, user: user) } let(:regex_match) { described_class.match('deploy staging to production') } |