fixed keys parsing from ENV/cli

This commit is contained in:
David Zhao
2021-01-30 13:20:39 -08:00
parent 65078f5ef8
commit 5ce52b6a30
4 changed files with 35 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfig_UnmarshalKeys(t *testing.T) {
conf, err := NewConfig("")
assert.NoError(t, err)
assert.NoError(t, conf.unmarshalKeys("key1: secret1"))
assert.Equal(t, "secret1", conf.Keys["key1"])
}