fixup: add test for global section

This commit is contained in:
Christian Schwarz
2018-10-11 17:46:41 +02:00
parent 525a875825
commit 0c3a694470
2 changed files with 83 additions and 12 deletions
+1 -12
View File
@@ -2,12 +2,10 @@ package config
import (
"github.com/kr/pretty"
"github.com/stretchr/testify/require"
"path"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/zrepl/yaml-config"
)
func TestSampleConfigsAreParsedWithoutErrors(t *testing.T) {
@@ -37,15 +35,6 @@ func TestSampleConfigsAreParsedWithoutErrors(t *testing.T) {
}
func TestLoggingOutletEnumList_SetDefaults(t *testing.T) {
e := &LoggingOutletEnumList{}
var i yaml.Defaulter = e
require.NotPanics(t, func() {
i.SetDefault()
assert.Equal(t, "warn", (*e)[0].Ret.(StdoutLoggingOutlet).Level)
})
}
func testValidConfig(t *testing.T, input string) (*Config) {
t.Helper()