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
Jérome Perrin
gitlab-ce
Commits
0b49e8e6
Commit
0b49e8e6
authored
Mar 07, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix false positive spec of using digest instead of hexdigest
parent
b8ce910f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/lib/gitlab/ci/trace_spec.rb
spec/lib/gitlab/ci/trace_spec.rb
+4
-4
No files found.
spec/lib/gitlab/ci/trace_spec.rb
View file @
0b49e8e6
...
...
@@ -413,7 +413,7 @@ describe Gitlab::Ci::Trace do
expect
(
build
.
job_artifacts_trace
.
file
.
filename
).
to
eq
(
'job.log'
)
expect
(
File
.
exist?
(
src_path
)).
to
be_falsy
expect
(
src_checksum
)
.
to
eq
(
Digest
::
SHA256
.
file
(
build
.
job_artifacts_trace
.
file
.
path
).
digest
)
.
to
eq
(
Digest
::
SHA256
.
file
(
build
.
job_artifacts_trace
.
file
.
path
).
hex
digest
)
expect
(
build
.
job_artifacts_trace
.
file_sha256
).
to
eq
(
src_checksum
)
end
end
...
...
@@ -439,7 +439,7 @@ describe Gitlab::Ci::Trace do
expect
(
build
.
job_artifacts_trace
.
file
.
filename
).
to
eq
(
'job.log'
)
expect
(
build
.
old_trace
).
to
be_nil
expect
(
src_checksum
)
.
to
eq
(
Digest
::
SHA256
.
file
(
build
.
job_artifacts_trace
.
file
.
path
).
digest
)
.
to
eq
(
Digest
::
SHA256
.
file
(
build
.
job_artifacts_trace
.
file
.
path
).
hex
digest
)
expect
(
build
.
job_artifacts_trace
.
file_sha256
).
to
eq
(
src_checksum
)
end
end
...
...
@@ -459,7 +459,7 @@ describe Gitlab::Ci::Trace do
context
'when trace file stored in default path'
do
let!
(
:build
)
{
create
(
:ci_build
,
:success
,
:trace_live
)
}
let!
(
:src_path
)
{
trace
.
read
{
|
s
|
return
s
.
path
}
}
let!
(
:src_checksum
)
{
Digest
::
SHA256
.
file
(
src_path
).
digest
}
let!
(
:src_checksum
)
{
Digest
::
SHA256
.
file
(
src_path
).
hex
digest
}
it_behaves_like
'archive trace file'
...
...
@@ -485,7 +485,7 @@ describe Gitlab::Ci::Trace do
context
'when trace is stored in database'
do
let
(
:build
)
{
create
(
:ci_build
,
:success
)
}
let
(
:trace_content
)
{
'Sample trace'
}
let!
(
:src_checksum
)
{
Digest
::
SHA256
.
digest
(
trace_content
)
}
let!
(
:src_checksum
)
{
Digest
::
SHA256
.
hex
digest
(
trace_content
)
}
before
do
build
.
update_column
(
:trace
,
trace_content
)
...
...
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