Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bb2e2db8
Commit
bb2e2db8
authored
May 01, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an additonal test to show behaviour of deep merging jobs
parent
e12ad8b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
ee/spec/lib/ee/gitlab/ci/config_spec.rb
ee/spec/lib/ee/gitlab/ci/config_spec.rb
+33
-0
No files found.
ee/spec/lib/ee/gitlab/ci/config_spec.rb
View file @
bb2e2db8
...
@@ -164,5 +164,38 @@ describe EE::Gitlab::Ci::Config do
...
@@ -164,5 +164,38 @@ describe EE::Gitlab::Ci::Config do
expect
(
config
.
to_hash
).
to
eq
({
variables:
{
A
:
'alpha'
,
B
:
'beta'
,
C
:
'gamma'
,
D
:
'delta'
}
})
expect
(
config
.
to_hash
).
to
eq
({
variables:
{
A
:
'alpha'
,
B
:
'beta'
,
C
:
'gamma'
,
D
:
'delta'
}
})
end
end
end
end
context
'when both external files and gitlab_ci.yml define a job'
do
let
(
:remote_file_content
)
do
<<~
HEREDOC
job1:
script:
- echo 'hello from remote file'
HEREDOC
end
let
(
:gitlab_ci_yml
)
do
<<~
HEREDOC
include:
-
#{
remote_location
}
job1:
variables:
VARIABLE_DEFINED_IN_MAIN_FILE: 'some value'
HEREDOC
end
it
'merges the jobs'
do
WebMock
.
stub_request
(
:get
,
remote_location
).
to_return
(
body:
remote_file_content
)
expect
(
config
.
to_hash
).
to
eq
({
job1:
{
script:
[
"echo 'hello from remote file'"
],
variables:
{
VARIABLE_DEFINED_IN_MAIN_FILE
:
'some value'
}
}
})
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment