mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 22:43:41 +08:00
remove testing for viper
This commit is contained in:
parent
20b1fb9ab7
commit
abf90ad7b7
@ -1,24 +0,0 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAllKeysWithEnv(t *testing.T) {
|
||||
|
||||
v := GetViper()
|
||||
v.BindEnv("id")
|
||||
v.BindEnv("foo", "foo")
|
||||
|
||||
// bind and define environment variables (including a nested one)
|
||||
os.Setenv("WEED_ID", "13")
|
||||
os.Setenv("WEED_FOO_BAR", "baz")
|
||||
|
||||
sub := v.Sub("foo")
|
||||
|
||||
assert.Equal(t, "13", v.GetString("id"))
|
||||
assert.Equal(t, nil, sub)
|
||||
}
|
Loading…
Reference in New Issue
Block a user