Fix wording in spec. Add PIPELINE_IID in examples of debugged variables in documants.

This commit is contained in:
Shinya Maeda 2018-06-04 12:12:02 +09:00
parent 12b41a194b
commit eb05d475b7
2 changed files with 7 additions and 4 deletions

View file

@ -353,6 +353,8 @@ Running on runner-8a2f473d-project-1796893-concurrent-0 via runner-8a2f473d-mach
++ CI_PROJECT_URL=https://example.com/gitlab-examples/ci-debug-trace
++ export CI_PIPELINE_ID=52666
++ CI_PIPELINE_ID=52666
++ export CI_PIPELINE_IID=123
++ CI_PIPELINE_IID=123
++ export CI_RUNNER_ID=1337
++ CI_RUNNER_ID=1337
++ export CI_RUNNER_DESCRIPTION=shared-runners-manager-1.example.com
@ -440,6 +442,7 @@ export CI_JOB_MANUAL="true"
export CI_JOB_TRIGGERED="true"
export CI_JOB_TOKEN="abcde-1234ABCD5678ef"
export CI_PIPELINE_ID="1000"
export CI_PIPELINE_IID="10"
export CI_PROJECT_ID="34"
export CI_PROJECT_DIR="/builds/gitlab-org/gitlab-ce"
export CI_PROJECT_NAME="gitlab-ce"

View file

@ -143,7 +143,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
it 'wastes pipeline iid' do
expect { step.perform! }.to raise_error
expect(InternalId.ci_pipelines.where(project_id: project.id).exists?).to be_truthy
expect(InternalId.ci_pipelines.where(project_id: project.id).last.last_value).to be > 0
end
end
end
@ -157,7 +157,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
end
context 'when variables policy is specified' do
shared_examples_for 'populates pipeline according to used policies' do
shared_examples_for 'a correct pipeline' do
it 'populates pipeline according to used policies' do
step.perform!
@ -177,7 +177,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
build(:ci_pipeline, ref: 'master', config: config)
end
it_behaves_like 'populates pipeline according to used policies'
it_behaves_like 'a correct pipeline'
context 'when variables expression is specified' do
context 'when pipeline iid is the subject' do
@ -186,7 +186,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
prod: { script: 'cap prod', only: { variables: ["$CI_PIPELINE_IID == '1000'"] } } }
end
it_behaves_like 'populates pipeline according to used policies'
it_behaves_like 'a correct pipeline'
end
end
end