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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-workhorse
Commits
61e4d00c
Commit
61e4d00c
authored
Dec 19, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the standard Go testdata directory
parent
8b39e1f4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
14 deletions
+13
-14
.gitignore
.gitignore
+2
-2
Makefile
Makefile
+9
-10
main_test.go
main_test.go
+2
-2
testdata/.gitkeep
testdata/.gitkeep
+0
-0
No files found.
.gitignore
View file @
61e4d00c
test/data
test/scratch
gitlab-workhorse
testdata/data
testdata/scratch
Makefile
View file @
61e4d00c
...
...
@@ -8,25 +8,24 @@ install: gitlab-workhorse
install
gitlab-workhorse
${PREFIX}
/bin/
.PHONY
:
test
test
:
test/data/group/test.git clean-workhorse gitlab-workhorse
go
fmt
.
./internal/... |
awk
'{ print } END { if (NR > 0) { print "Please run go fmt"; exit 1 } }'
go
test
./internal/...
go
test
test
:
testdata/data/group/test.git clean-workhorse gitlab-workhorse
go
fmt
./... |
awk
'{ print } END { if (NR > 0) { print "Please run go fmt"; exit 1 } }'
go
test
./...
coverage
:
test/data/group/test.git
coverage
:
test
data
/data/group/test.git
go
test
-cover
-coverprofile
=
test.coverage
go tool cover
-html
=
test.coverage
-o
coverage.html
rm
-f
test.coverage
test
/data/group/test.git
:
test
/data
git clone
--bare
https://gitlab.com/gitlab-org/gitlab-test.git
test
/data/group/test.git
test
data/data/group/test.git
:
testdata
/data
git clone
--bare
https://gitlab.com/gitlab-org/gitlab-test.git
$@
test/data
:
mkdir
-p
test
/data
test
data
/data
:
mkdir
-p
$@
.PHONY
:
clean
clean
:
clean-workhorse
rm
-rf
test
/data
test
/scratch
rm
-rf
test
data/data testdata
/scratch
.PHONY
:
clean-workhorse
clean-workhorse
:
...
...
main_test.go
View file @
61e4d00c
...
...
@@ -19,8 +19,8 @@ import (
"time"
)
const
scratchDir
=
"test/scratch"
const
testRepoRoot
=
"test/data"
const
scratchDir
=
"test
data
/scratch"
const
testRepoRoot
=
"test
data
/data"
const
testRepo
=
"group/test.git"
const
testProject
=
"group/test"
...
...
test/.gitkeep
→
test
data
/.gitkeep
View file @
61e4d00c
File moved
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