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
Boxiang Sun
gitlab-ce
Commits
ee373f28
Commit
ee373f28
authored
Nov 06, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flaky spec
parent
65a7a6e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
spec/services/update_deployment_service_spec.rb
spec/services/update_deployment_service_spec.rb
+6
-5
No files found.
spec/services/update_deployment_service_spec.rb
View file @
ee373f28
...
...
@@ -182,15 +182,16 @@ describe UpdateDeploymentService do
context
"if the 'first_deployed_to_production_at' time is already set"
do
it
"does not overwrite the older 'first_deployed_to_production_at' time"
do
# Previous deploy
time
=
Time
.
now
Timecop
.
freeze
(
time
)
{
service
.
execute
}
service
.
execute
expect
(
merge_request
.
reload
.
metrics
.
first_deployed_to_production_at
).
to
be_like_time
(
time
)
expect
(
merge_request
.
reload
.
metrics
.
first_deployed_to_production_at
).
to
be_like_time
(
deployment
.
finished_at
)
# Current deploy
Timecop
.
freeze
(
time
+
12
.
hours
)
{
service
.
execute
}
Timecop
.
travel
(
12
.
hours
.
from_now
)
do
service
.
execute
expect
(
merge_request
.
reload
.
metrics
.
first_deployed_to_production_at
).
to
be_like_time
(
time
)
expect
(
merge_request
.
reload
.
metrics
.
first_deployed_to_production_at
).
to
be_like_time
(
deployment
.
finished_at
)
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