mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #106584 from jonyhy96/fix-test-flake
[cloud-provider] fix test failed because of flag redefined
This commit is contained in:
commit
32a244552e
@ -206,6 +206,10 @@ func configFromEnvOrSim() (VSphereConfig, func()) {
|
||||
return configFromSim()
|
||||
}
|
||||
|
||||
func init() {
|
||||
klog.InitFlags(nil)
|
||||
}
|
||||
|
||||
func TestSecretUpdated(t *testing.T) {
|
||||
datacenter := "0.0.0.0"
|
||||
secretName := "vccreds"
|
||||
@ -227,9 +231,7 @@ func TestSecretUpdated(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Should succeed when a valid config is provided: %s", err)
|
||||
}
|
||||
klog.Flush()
|
||||
|
||||
klog.InitFlags(nil)
|
||||
flag.Set("logtostderr", "false")
|
||||
flag.Set("alsologtostderr", "false")
|
||||
flag.Set("v", "9")
|
||||
|
Loading…
Reference in New Issue
Block a user