mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-21 19:39:04 -05:00
Merge master
This commit is contained in:
@@ -255,7 +255,7 @@ func getYAMLServerConfig(fs filesys.Filesys, path string) (ServerConfig, error)
|
||||
return nil, fmt.Errorf("Failed to read file '%s'. Error: %s", path, err.Error())
|
||||
}
|
||||
|
||||
cfg, err := newYamlConfig(data)
|
||||
cfg, err := NewYamlConfig(data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to parse yaml file '%s'. Error: %s", path, err.Error())
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ type YAMLConfig struct {
|
||||
PerformanceConfig PerformanceYAMLConfig `yaml:"performance"`
|
||||
}
|
||||
|
||||
func newYamlConfig(configFileData []byte) (YAMLConfig, error) {
|
||||
func NewYamlConfig(configFileData []byte) (YAMLConfig, error) {
|
||||
var cfg YAMLConfig
|
||||
err := yaml.UnmarshalStrict(configFileData, &cfg)
|
||||
return cfg, err
|
||||
|
||||
@@ -61,7 +61,7 @@ databases:
|
||||
},
|
||||
}
|
||||
|
||||
config, err := newYamlConfig([]byte(testStr))
|
||||
config, err := NewYamlConfig([]byte(testStr))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, expected, config)
|
||||
}
|
||||
@@ -92,7 +92,7 @@ databases:
|
||||
- name: noaa
|
||||
path: /Users/brian/datasets/noaa
|
||||
`
|
||||
_, err := newYamlConfig([]byte(testStr))
|
||||
_, err := NewYamlConfig([]byte(testStr))
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user