@@ -22,7 +22,7 @@ import (
22
22
)
23
23
24
24
func TestReadConfig (t * testing.T ) {
25
- config , err := ReadConfig ("./config_example.yml" )
25
+ config , err := readConfig ("./config_example.yml" )
26
26
27
27
require .NoError (t , err )
28
28
expected := Config {
@@ -52,7 +52,7 @@ func TestReadConfig(t *testing.T) {
52
52
}
53
53
54
54
func TestReadConfigParsesDeprecatedFormat (t * testing.T ) {
55
- config , err := ReadConfig ("./config_example.deprecated.yml" )
55
+ config , err := readConfig ("./config_example.deprecated.yml" )
56
56
57
57
require .NoError (t , err )
58
58
expected := Config {
@@ -77,14 +77,14 @@ func TestReadConfigParsesDeprecatedFormat(t *testing.T) {
77
77
func TestReadConfigFromEmptyFile (t * testing.T ) {
78
78
file , _ := os .CreateTemp ("" , "empty.yaml" )
79
79
80
- config , err := ReadConfig (file .Name ())
80
+ config , err := readConfig (file .Name ())
81
81
82
82
require .NoError (t , err )
83
83
require .ElementsMatch (t , Config {}, config )
84
84
}
85
85
86
86
func TestReadConfigFromNonExistingFileFails (t * testing.T ) {
87
- config , err := ReadConfig ("./foo" )
87
+ config , err := readConfig ("./foo" )
88
88
89
89
require .Error (t , err )
90
90
require .ElementsMatch (t , nil , config )
@@ -94,7 +94,7 @@ func TestReadConfigFromIncorrectFormatFails(t *testing.T) {
94
94
file , _ := os .CreateTemp ("" , "empty.yaml" )
95
95
file .WriteString ("foo" )
96
96
97
- config , err := ReadConfig (file .Name ())
97
+ config , err := readConfig (file .Name ())
98
98
99
99
require .Error (t , err )
100
100
require .ElementsMatch (t , Config {}, config )
0 commit comments