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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
fe34b745
Commit
fe34b745
authored
Nov 03, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
1056c9d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+11
-15
No files found.
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
fe34b745
...
@@ -123,18 +123,16 @@ module Ci
...
@@ -123,18 +123,16 @@ module Ci
config
=
YAML
.
dump
({
config
=
YAML
.
dump
({
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
build:
{
script:
"build"
,
type:
"build"
,
only:
[
"master"
,
"deploy"
]
},
rspec:
{
script:
"rspec"
,
type:
"test"
,
only:
[
"master"
,
"deploy"
]
},
rspec:
{
script:
"rspec"
,
type:
type
,
only:
[
"master"
,
"deploy"
]
},
staging:
{
script:
"deploy"
,
type:
"deploy"
,
only:
[
"master"
,
"deploy"
]
},
staging:
{
script:
"deploy"
,
type:
"deploy"
,
only:
[
"master"
,
"deploy"
]
},
production:
{
script:
"deploy"
,
type:
"deploy"
,
only:
[
"master"
,
"deploy"
]
},
production:
{
script:
"deploy"
,
type:
"deploy"
,
only:
[
"master@path"
,
"deploy"
]
},
production:
{
script:
"deploy"
,
type:
"deploy"
,
only:
[
"master@path"
,
"deploy"
]
},
})
})
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
path
)
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
'fork'
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"production"
,
"deploy"
).
size
).
to
eq
(
0
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
type
,
"deploy"
).
size
).
to
eq
(
1
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"deploy"
,
"deploy"
).
size
).
to
eq
(
2
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"deploy"
,
"deploy"
).
size
).
to
eq
(
2
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"test"
,
"deploy"
).
size
).
to
eq
(
1
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"deploy"
,
"master"
).
size
).
to
eq
(
1
)
end
end
end
end
...
@@ -230,18 +228,16 @@ module Ci
...
@@ -230,18 +228,16 @@ module Ci
it
"returns build except specified type"
do
it
"returns build except specified type"
do
config
=
YAML
.
dump
({
config
=
YAML
.
dump
({
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
build:
{
script:
"build"
,
type:
"build"
,
except:
[
"master"
,
"deploy"
]
},
rspec:
{
script:
"rspec"
,
type:
"test"
,
except:
[
"master"
,
"deploy"
,
"test@fork"
]
},
rspec:
{
script:
"rspec"
,
type:
type
,
except:
[
"master"
,
"deploy"
,
"test@fork"
]
},
staging:
{
script:
"deploy"
,
type:
"deploy"
,
except:
[
"master"
]
},
staging:
{
script:
"deploy"
,
type:
"deploy"
,
except:
[
"master"
,
"deploy"
]
},
production:
{
script:
"deploy"
,
type:
"deploy"
,
except:
[
"master@fork"
]
},
production:
{
script:
"deploy"
,
type:
"deploy"
,
except:
[
"master"
,
"deploy"
]
},
production:
{
script:
"deploy"
,
type:
"deploy"
,
except:
[
"master@path"
,
"deploy"
]
},
})
})
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
path
)
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
'fork'
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"
production"
,
"deploy"
).
size
).
to
eq
(
0
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"
deploy"
,
"deploy"
).
size
).
to
eq
(
2
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
type
,
"test"
).
size
).
to
eq
(
1
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"test"
,
"test"
).
size
).
to
eq
(
0
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"deploy"
,
"master"
).
size
).
to
eq
(
2
)
expect
(
config_processor
.
builds_for_stage_and_ref
(
"deploy"
,
"master"
).
size
).
to
eq
(
0
)
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