diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-26 12:12:52 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-31 04:38:12 -0700 |
commit | bf50573710ca008081063338664ec8b47a87d059 (patch) | |
tree | 298bf928cf9628f61aae517bfbc85b1558f105d8 /spec/lib/gitlab | |
parent | f7e3693435307b56e4da8d8584c6af01459e4813 (diff) | |
download | gitlab-ce-bf50573710ca008081063338664ec8b47a87d059.tar.gz |
Fix 500 error in CI lint when included templates are an arraysh-fix-ci-lint-500-error
Previously the following syntax would fail in the linter with an
error 500:
```
include:
template:
- License-Management.gitlab-ci.yml
- Dependency-Scanning.gitlab-ci.yml
- SAST.gitlab-ci.yml
```
Now the error will call out specifically that the value
is not a string.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66605
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r-- | spec/lib/gitlab/ci/config/external/file/base_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config/external/file/base_spec.rb b/spec/lib/gitlab/ci/config/external/file/base_spec.rb index dd536a241bd..af995f4869a 100644 --- a/spec/lib/gitlab/ci/config/external/file/base_spec.rb +++ b/spec/lib/gitlab/ci/config/external/file/base_spec.rb @@ -41,6 +41,12 @@ describe Gitlab::Ci::Config::External::File::Base do end describe '#valid?' do + context 'when location is not a string' do + let(:location) { %w(some/file.txt other/file.txt) } + + it { is_expected.not_to be_valid } + end + context 'when location is not a YAML file' do let(:location) { 'some/file.txt' } |