summaryrefslogtreecommitdiff
path: root/spec/scripts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-08 09:10:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-08 09:10:45 +0000
commitdb5097a28b061ef273a058aa64845c79635ea4e7 (patch)
treefa5674008152362bef2e11c3eb61fb122379f0ad /spec/scripts
parent9fe6f84c1fd4bb8cb6b8ec466ee59c76aff0dad5 (diff)
downloadgitlab-ce-db5097a28b061ef273a058aa64845c79635ea4e7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/scripts')
-rw-r--r--spec/scripts/trigger-build_spec.rb150
1 files changed, 0 insertions, 150 deletions
diff --git a/spec/scripts/trigger-build_spec.rb b/spec/scripts/trigger-build_spec.rb
index 9c2033bf493..46023d5823d 100644
--- a/spec/scripts/trigger-build_spec.rb
+++ b/spec/scripts/trigger-build_spec.rb
@@ -244,156 +244,6 @@ RSpec.describe Trigger do
end
end
- describe Trigger::Omnibus do
- describe '#variables' do
- it 'invokes the trigger with expected variables' do
- expect(subject.variables).to include(
- 'SKIP_QA_TEST' => 'true',
- 'SKIP_QA_DOCKER' => 'true',
- 'ALTERNATIVE_SOURCES' => 'true',
- 'CACHE_UPDATE' => env['OMNIBUS_GITLAB_CACHE_UPDATE']
- )
- end
-
- context 'when CI_COMMIT_SHA is set' do
- before do
- stub_env('CI_COMMIT_SHA', 'ci_commit_sha')
- end
-
- it 'sets GITLAB_VERSION & IMAGE_TAG to ci_commit_sha' do
- expect(subject.variables).to include(
- 'GITLAB_VERSION' => 'ci_commit_sha',
- 'IMAGE_TAG' => 'ci_commit_sha'
- )
- end
- end
-
- context 'when Trigger.security? is true' do
- before do
- allow(Trigger).to receive(:security?).and_return(true)
- end
-
- it 'sets SECURITY_SOURCES to true' do
- expect(subject.variables['SECURITY_SOURCES']).to eq('true')
- end
- end
-
- context 'when Trigger.security? is false' do
- before do
- allow(Trigger).to receive(:security?).and_return(false)
- end
-
- it 'sets SECURITY_SOURCES to false' do
- expect(subject.variables['SECURITY_SOURCES']).to eq('false')
- end
- end
-
- context 'when Trigger.ee? is true' do
- before do
- allow(Trigger).to receive(:ee?).and_return(true)
- end
-
- it 'sets ee to true' do
- expect(subject.variables['ee']).to eq('true')
- end
- end
-
- context 'when Trigger.ee? is false' do
- before do
- allow(Trigger).to receive(:ee?).and_return(false)
- end
-
- it 'sets ee to false' do
- expect(subject.variables['ee']).to eq('false')
- end
- end
- end
-
- describe '.access_token' do
- context 'when OMNIBUS_GITLAB_PROJECT_ACCESS_TOKEN is set' do
- let(:omnibus_gitlab_project_access_token) { 'omnibus_gitlab_project_access_token' }
-
- before do
- stub_env('OMNIBUS_GITLAB_PROJECT_ACCESS_TOKEN', omnibus_gitlab_project_access_token)
- end
-
- it 'returns the omnibus-specific access token' do
- expect(described_class.access_token).to eq(omnibus_gitlab_project_access_token)
- end
- end
-
- context 'when OMNIBUS_GITLAB_PROJECT_ACCESS_TOKEN is not set' do
- before do
- stub_env('OMNIBUS_GITLAB_PROJECT_ACCESS_TOKEN', nil)
- end
-
- it 'returns the default access token' do
- expect(described_class.access_token).to eq(Trigger::Base.access_token)
- end
- end
- end
-
- describe '#invoke!' do
- let(:downstream_project_path) { 'gitlab-org/build/omnibus-gitlab-mirror' }
- let(:ref) { 'master' }
-
- let(:env) do
- super().merge(
- 'QA_IMAGE' => 'qa_image',
- 'GITLAB_QA_OPTIONS' => 'gitlab_qa_options',
- 'QA_TESTS' => 'qa_tests',
- 'ALLURE_JOB_NAME' => 'allure_job_name'
- )
- end
-
- describe '#downstream_project_path' do
- context 'when OMNIBUS_PROJECT_PATH is set' do
- let(:downstream_project_path) { 'omnibus_project_path' }
-
- before do
- stub_env('OMNIBUS_PROJECT_PATH', downstream_project_path)
- end
-
- it 'triggers the pipeline on the correct project' do
- expect_run_trigger_with_params
-
- subject.invoke!
- end
- end
- end
-
- describe '#ref' do
- context 'when OMNIBUS_BRANCH is set' do
- let(:ref) { 'omnibus_branch' }
-
- before do
- stub_env('OMNIBUS_BRANCH', ref)
- end
-
- it 'triggers the pipeline on the correct ref' do
- expect_run_trigger_with_params
-
- subject.invoke!
- end
- end
- end
-
- context 'when CI_COMMIT_REF_NAME is a stable branch' do
- let(:ref) { '14-10-stable' }
-
- before do
- stub_env('CI_COMMIT_REF_NAME', "#{ref}-ee")
- end
-
- it 'triggers the pipeline on the correct ref' do
- expect_run_trigger_with_params
-
- subject.invoke!
- end
- end
- end
- end
-
describe Trigger::CNG do
describe '#variables' do
it 'does not include redundant variables' do