mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
fix: klog flag redefined
Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
parent
991bb65ecc
commit
eb673cec64
@ -206,6 +206,10 @@ func configFromEnvOrSim() (VSphereConfig, func()) {
|
|||||||
return configFromSim()
|
return configFromSim()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
klog.InitFlags(nil)
|
||||||
|
}
|
||||||
|
|
||||||
func TestSecretUpdated(t *testing.T) {
|
func TestSecretUpdated(t *testing.T) {
|
||||||
datacenter := "0.0.0.0"
|
datacenter := "0.0.0.0"
|
||||||
secretName := "vccreds"
|
secretName := "vccreds"
|
||||||
@ -227,9 +231,7 @@ func TestSecretUpdated(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Should succeed when a valid config is provided: %s", err)
|
t.Fatalf("Should succeed when a valid config is provided: %s", err)
|
||||||
}
|
}
|
||||||
klog.Flush()
|
|
||||||
|
|
||||||
klog.InitFlags(nil)
|
|
||||||
flag.Set("logtostderr", "false")
|
flag.Set("logtostderr", "false")
|
||||||
flag.Set("alsologtostderr", "false")
|
flag.Set("alsologtostderr", "false")
|
||||||
flag.Set("v", "9")
|
flag.Set("v", "9")
|
||||||
|
Loading…
Reference in New Issue
Block a user