parent
7cdc244a72
commit
ab692e73de
2 changed files with 2 additions and 10 deletions
|
@ -98,15 +98,6 @@ func TestDataDirMultipleSources(t *testing.T) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDataDirUnknownFormat(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
sources := []source.ByteSource{
|
|
||||||
{Name: filepath.FromSlash("data/test.roml"), Content: []byte("boo")},
|
|
||||||
}
|
|
||||||
doTestDataDir(t, true, sources)
|
|
||||||
}
|
|
||||||
|
|
||||||
func doTestDataDir(t *testing.T, expected interface{}, sources []source.ByteSource, configKeyValues ...interface{}) {
|
func doTestDataDir(t *testing.T, expected interface{}, sources []source.ByteSource, configKeyValues ...interface{}) {
|
||||||
var (
|
var (
|
||||||
cfg, fs = newTestCfg()
|
cfg, fs = newTestCfg()
|
||||||
|
|
|
@ -841,7 +841,8 @@ func (s *Site) loadData(sources []source.Input) (err error) {
|
||||||
|
|
||||||
data, err := s.readData(r)
|
data, err := s.readData(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Failed to read data from %s: %s", filepath.Join(r.Path(), r.LogicalName()), err)
|
s.Log.WARN.Printf("Failed to read data from %s: %s", filepath.Join(r.Path(), r.LogicalName()), err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if data == nil {
|
if data == nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue