Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
9ec89c6f
Commit
9ec89c6f
authored
Sep 08, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't depend on Git version string in test
parent
423a1e57
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
main_test.go
main_test.go
+7
-3
No files found.
main_test.go
View file @
9ec89c6f
...
...
@@ -737,9 +737,13 @@ func TestGetGitPatch(t *testing.T) {
t
.
Fatalf
(
"Expected: From 54fcc214b94e78d7a41a9a8fe6d87a5e59500e51 Mon Sep 17 00:00:00 2001, got: %v"
,
body
)
}
bodyLengthBytes
:=
len
(
body
)
if
bodyLengthBytes
!=
449
{
t
.
Fatal
(
"Expected the body to consist of 449 bytes, got %v"
,
bodyLengthBytes
)
// The contents of the last line of the patch depend on the version of
// Git used during the test run. Ignore that data and look at the line
// that should terminate the diff.
lastPatchIndex
:=
442
endOfPatch
:=
string
(
body
[
lastPatchIndex
-
5
:
lastPatchIndex
])
if
endOfPatch
!=
"
\n
--
\n
"
{
t
.
Fatalf
(
"Expected end of patch at %d, found %q"
,
lastPatchIndex
,
endOfPatch
)
}
}
...
...
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