Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-25 18:06:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-25 18:06:45 +0300
commited9c54b56af280cc552aaac1cfa55533c900c1be (patch)
tree99605e6980c1673566fe7f293f9e4fe8dcdc4416 /spec/services/ci/create_pipeline_service_spec.rb
parent8f1f6b374b69fd6356bdc5561d56f5ca9db9fadd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/create_pipeline_service_spec.rb')
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index de0f4841215..8f16d375f03 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -801,6 +801,32 @@ describe Ci::CreatePipelineService do
end
end
+ context 'environment with Kubernetes configuration' do
+ let(:kubernetes_namespace) { 'custom-namespace' }
+
+ before do
+ config = YAML.dump(
+ deploy: {
+ environment: {
+ name: "environment-name",
+ kubernetes: { namespace: kubernetes_namespace }
+ },
+ script: 'ls'
+ }
+ )
+
+ stub_ci_pipeline_yaml_file(config)
+ end
+
+ it 'stores the requested namespace' do
+ result = execute_service
+ build = result.builds.first
+
+ expect(result).to be_persisted
+ expect(build.options.dig(:environment, :kubernetes, :namespace)).to eq(kubernetes_namespace)
+ end
+ end
+
context 'when environment with invalid name' do
before do
config = YAML.dump(deploy: { environment: { name: 'name,with,commas' }, script: 'ls' })