Commit 61e4d00c authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use the standard Go testdata directory

parent 8b39e1f4
test/data
test/scratch
gitlab-workhorse
testdata/data
testdata/scratch
......@@ -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: testdata/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
testdata/data/group/test.git: testdata/data
git clone --bare https://gitlab.com/gitlab-org/gitlab-test.git $@
test/data:
mkdir -p test/data
testdata/data:
mkdir -p $@
.PHONY: clean
clean: clean-workhorse
rm -rf test/data test/scratch
rm -rf testdata/data testdata/scratch
.PHONY: clean-workhorse
clean-workhorse:
......
......@@ -19,8 +19,8 @@ import (
"time"
)
const scratchDir = "test/scratch"
const testRepoRoot = "test/data"
const scratchDir = "testdata/scratch"
const testRepoRoot = "testdata/data"
const testRepo = "group/test.git"
const testProject = "group/test"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment