mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 16:34:32 +01:00
c69ebd3806
cmd subdir does not build on purpose, it's only left in tree to grab old code and move it to github.com/zrepl/zrepl/daemon
30 lines
466 B
Go
30 lines
466 B
Go
package config
|
|
|
|
import (
|
|
"github.com/kr/pretty"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestSampleConfigsAreParsedWithoutErrors(t *testing.T) {
|
|
paths, err := filepath.Glob("./samples/*")
|
|
if err != nil {
|
|
t.Errorf("glob failed: %+v", err)
|
|
}
|
|
|
|
for _, p := range paths {
|
|
|
|
t.Run(p, func(t *testing.T) {
|
|
c, err := ParseConfig(p)
|
|
if err != nil {
|
|
t.Errorf("error parsing %s:\n%+v", p, err)
|
|
}
|
|
|
|
t.Logf("file: %s", p)
|
|
t.Log(pretty.Sprint(c))
|
|
})
|
|
|
|
}
|
|
|
|
}
|