Skip to content

Commit 318bbaf

Browse files
committed
YTS test instructs how to download test data
In order to run the yaml test suite we need the data files to be present. A user with a fresh clone trying to run all tests will face an error. This makes the error message clear and provides the step needed to enable the tests to run.
1 parent 2360ce7 commit 318bbaf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

GNUmakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ count ?= 1
4545
test: $(TEST-DEPS)
4646
go test$(if $v, -v)
4747

48+
test-data: $(YTS-DIR)
49+
4850
test-all: test test-yts-all
4951

5052
test-yts: $(TEST-DEPS)

yts/test_suite_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ func shouldSkipTest(t *testing.T) {
4949

5050
func TestYAMLSuite(t *testing.T) {
5151
testDir := "./testdata/data-2022-01-17"
52+
if _, err := os.Stat(testDir + "/229Q"); os.IsNotExist(err) {
53+
t.Fatalf("YTS tests requires the data files to be present in `%s`. Run `make test-data` to download them.", testDir)
54+
}
5255
runTestsInDir(t, testDir)
5356
}
5457

0 commit comments

Comments
 (0)