mirror of https://github.com/docker/docs.git
Jenkins: only test frontmatter
Signed-off-by: Adrien Duermael <adrien@duermael.com>
This commit is contained in:
parent
6eb35b92bf
commit
b3df66f777
|
@ -5,4 +5,4 @@ COPY src /go/src
|
||||||
WORKDIR /go/src/validator
|
WORKDIR /go/src/validator
|
||||||
|
|
||||||
# when running the container, MOUNT docs repo in /docs
|
# when running the container, MOUNT docs repo in /docs
|
||||||
CMD ["go", "test"]
|
CMD ["go", "test", "-v", "-run", "FrontMatter"]
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
// TestFrontmatterTitle tests if there's a title present in all
|
// TestFrontmatterTitle tests if there's a title present in all
|
||||||
// published markdown frontmatters.
|
// 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 {
|
filepath.Walk("/docs", func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err.Error(), "-", path)
|
t.Error(err.Error(), "-", path)
|
||||||
|
@ -22,7 +22,7 @@ func TestFrontmatterTitle(t *testing.T) {
|
||||||
if published == false {
|
if published == false {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
err = testFrontmatterTitle(mdBytes)
|
err = testFrontMatterTitle(mdBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err.Error(), "-", path)
|
t.Error(err.Error(), "-", path)
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ func TestFrontmatterTitle(t *testing.T) {
|
||||||
|
|
||||||
// testFrontmatterTitle tests if there's a title present in
|
// testFrontmatterTitle tests if there's a title present in
|
||||||
// given markdown file bytes
|
// given markdown file bytes
|
||||||
func testFrontmatterTitle(mdBytes []byte) error {
|
func testFrontMatterTitle(mdBytes []byte) error {
|
||||||
fm, _, err := frontparser.ParseFrontmatterAndContent(mdBytes)
|
fm, _, err := frontparser.ParseFrontmatterAndContent(mdBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
Loading…
Reference in New Issue