Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3df66f

Browse files
committed
Jenkins: only test frontmatter
Signed-off-by: Adrien Duermael <[email protected]>
1 parent 6eb35b9 commit b3df66f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ COPY src /go/src
55
WORKDIR /go/src/validator
66

77
# when running the container, MOUNT docs repo in /docs
8-
CMD ["go", "test"]
8+
CMD ["go", "test", "-v", "-run", "FrontMatter"]

tests/src/validator/markdown_test.go renamed to tests/src/validator/frontmatter_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// TestFrontmatterTitle tests if there's a title present in all
1212
// published markdown frontmatters.
13-
func TestFrontmatterTitle(t *testing.T) {
13+
func TestFrontMatterTitle(t *testing.T) {
1414
filepath.Walk("/docs", func(path string, info os.FileInfo, err error) error {
1515
if err != nil {
1616
t.Error(err.Error(), "-", path)
@@ -22,7 +22,7 @@ func TestFrontmatterTitle(t *testing.T) {
2222
if published == false {
2323
return nil
2424
}
25-
err = testFrontmatterTitle(mdBytes)
25+
err = testFrontMatterTitle(mdBytes)
2626
if err != nil {
2727
t.Error(err.Error(), "-", path)
2828
}
@@ -32,7 +32,7 @@ func TestFrontmatterTitle(t *testing.T) {
3232

3333
// testFrontmatterTitle tests if there's a title present in
3434
// given markdown file bytes
35-
func testFrontmatterTitle(mdBytes []byte) error {
35+
func testFrontMatterTitle(mdBytes []byte) error {
3636
fm, _, err := frontparser.ParseFrontmatterAndContent(mdBytes)
3737
if err != nil {
3838
return err

0 commit comments

Comments
 (0)