From b3df66f77772771708c90f39a3f4e9cb039d9cef Mon Sep 17 00:00:00 2001 From: Adrien Duermael Date: Fri, 20 Jan 2017 15:42:23 -0800 Subject: [PATCH] Jenkins: only test frontmatter Signed-off-by: Adrien Duermael --- tests/Dockerfile | 2 +- .../src/validator/{markdown_test.go => frontmatter_test.go} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename tests/src/validator/{markdown_test.go => frontmatter_test.go} (93%) diff --git a/tests/Dockerfile b/tests/Dockerfile index b59eb32ebaf..948eec70945 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -5,4 +5,4 @@ COPY src /go/src WORKDIR /go/src/validator # when running the container, MOUNT docs repo in /docs -CMD ["go", "test"] +CMD ["go", "test", "-v", "-run", "FrontMatter"] diff --git a/tests/src/validator/markdown_test.go b/tests/src/validator/frontmatter_test.go similarity index 93% rename from tests/src/validator/markdown_test.go rename to tests/src/validator/frontmatter_test.go index 72ea12e09c0..4360c5446ea 100644 --- a/tests/src/validator/markdown_test.go +++ b/tests/src/validator/frontmatter_test.go @@ -10,7 +10,7 @@ import ( // TestFrontmatterTitle tests if there's a title present in all // published markdown frontmatters. -func TestFrontmatterTitle(t *testing.T) { +func TestFrontMatterTitle(t *testing.T) { filepath.Walk("/docs", func(path string, info os.FileInfo, err error) error { if err != nil { t.Error(err.Error(), "-", path) @@ -22,7 +22,7 @@ func TestFrontmatterTitle(t *testing.T) { if published == false { return nil } - err = testFrontmatterTitle(mdBytes) + err = testFrontMatterTitle(mdBytes) if err != nil { t.Error(err.Error(), "-", path) } @@ -32,7 +32,7 @@ func TestFrontmatterTitle(t *testing.T) { // testFrontmatterTitle tests if there's a title present in // given markdown file bytes -func testFrontmatterTitle(mdBytes []byte) error { +func testFrontMatterTitle(mdBytes []byte) error { fm, _, err := frontparser.ParseFrontmatterAndContent(mdBytes) if err != nil { return err