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
1d90e4d3
Commit
1d90e4d3
authored
Feb 27, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing variable specs
parent
8bffd85b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
ee/spec/models/ci/build_spec.rb
ee/spec/models/ci/build_spec.rb
+6
-6
ee/spec/requests/api/runner_spec.rb
ee/spec/requests/api/runner_spec.rb
+1
-1
ee/spec/services/ci/process_pipeline_service_spec.rb
ee/spec/services/ci/process_pipeline_service_spec.rb
+1
-1
No files found.
ee/spec/models/ci/build_spec.rb
View file @
1d90e4d3
...
...
@@ -75,8 +75,8 @@ describe Ci::Build do
subject
{
job
.
variables
}
context
'when environment specific variable is defined'
do
let
(
:environment_varia
lb
e
)
do
{
key:
'ENV_KEY'
,
value:
'environment'
,
public:
false
}
let
(
:environment_varia
bl
e
)
do
{
key:
'ENV_KEY'
,
value:
'environment'
,
public:
false
,
masked:
false
}
end
before
do
...
...
@@ -85,7 +85,7 @@ describe Ci::Build do
variable
=
build
(
:ci_variable
,
environment_varia
lb
e
.
slice
(
:key
,
:value
)
environment_varia
bl
e
.
slice
(
:key
,
:value
)
.
merge
(
project:
project
,
environment_scope:
'stag*'
))
variable
.
save!
...
...
@@ -96,7 +96,7 @@ describe Ci::Build do
stub_licensed_features
(
variable_environment_scope:
true
)
end
it
{
is_expected
.
to
include
(
environment_varia
lb
e
)
}
it
{
is_expected
.
to
include
(
environment_varia
bl
e
)
}
end
context
'when variable environment scope is not available'
do
...
...
@@ -104,12 +104,12 @@ describe Ci::Build do
stub_licensed_features
(
variable_environment_scope:
false
)
end
it
{
is_expected
.
not_to
include
(
environment_varia
lb
e
)
}
it
{
is_expected
.
not_to
include
(
environment_varia
bl
e
)
}
end
context
'when there is a plan for the group'
do
it
'GITLAB_FEATURES should include the features for that plan'
do
is_expected
.
to
include
({
key:
'GITLAB_FEATURES'
,
value:
anything
,
public:
true
})
is_expected
.
to
include
({
key:
'GITLAB_FEATURES'
,
value:
anything
,
public:
true
,
masked:
false
})
features_variable
=
subject
.
find
{
|
v
|
v
[
:key
]
==
'GITLAB_FEATURES'
}
expect
(
features_variable
[
:value
]).
to
include
(
'multiple_ldap_servers'
)
end
...
...
ee/spec/requests/api/runner_spec.rb
View file @
1d90e4d3
...
...
@@ -46,7 +46,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
expect
(
response
).
to
have_http_status
(
:created
)
expect
(
json_response
).
to
include
(
"id"
=>
build
.
id
,
"variables"
=>
include
(
"key"
=>
'KEY'
,
"value"
=>
'value'
,
"public"
=>
true
),
"variables"
=>
include
(
"key"
=>
'KEY'
,
"value"
=>
'value'
,
"public"
=>
true
,
"masked"
=>
false
),
"image"
=>
a_hash_including
(
"name"
=>
'ruby'
),
"services"
=>
all
(
a_hash_including
(
"name"
=>
'mysql'
)),
"job_info"
=>
a_hash_including
(
"name"
=>
'terminal'
,
"stage"
=>
'terminal'
))
...
...
ee/spec/services/ci/process_pipeline_service_spec.rb
View file @
1d90e4d3
...
...
@@ -38,7 +38,7 @@ describe Ci::ProcessPipelineService, '#execute' do
expect
(
downstream
.
ci_pipelines
.
first
).
to
be_pending
expect
(
downstream
.
builds
).
not_to
be_empty
expect
(
downstream
.
builds
.
first
.
variables
)
.
to
include
(
key:
'BRIDGE'
,
value:
'cross'
,
public:
false
)
.
to
include
(
key:
'BRIDGE'
,
value:
'cross'
,
public:
false
,
masked:
false
)
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