summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-05-06 13:11:42 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-05-06 13:11:42 +0000
commit85609c117e2b96a786204069669c66d36d971733 (patch)
treee177a1fa0ddd9caa6cf4dab35c22a0ff94e66880 /spec/controllers/projects
parent4d2d812463256003ab943df90a9c603821078a69 (diff)
downloadgitlab-ce-85609c117e2b96a786204069669c66d36d971733.tar.gz
Implement support for CI variables of type file
Add env_var and file as supported types for CI variables. Variables of type file expose to users existing gitlab-runner behaviour - save variable value into a temp file and set the path to this file in an ENV var named after the variable key. Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/46806.
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/pipeline_schedules_controller_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb
index eb8983a7633..850ef9c92fb 100644
--- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb
+++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb
@@ -91,7 +91,7 @@ describe Projects::PipelineSchedulesController do
context 'when variables_attributes has one variable' do
let(:schedule) do
basic_param.merge({
- variables_attributes: [{ key: 'AAA', secret_value: 'AAA123' }]
+ variables_attributes: [{ key: 'AAA', secret_value: 'AAA123', variable_type: 'file' }]
})
end
@@ -105,6 +105,7 @@ describe Projects::PipelineSchedulesController do
Ci::PipelineScheduleVariable.last.tap do |v|
expect(v.key).to eq("AAA")
expect(v.value).to eq("AAA123")
+ expect(v.variable_type).to eq("file")
end
end
end