mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 13:42:02 +00:00
test/integration: skip etcd startup for -help flag
By parsing flags in the test's main function before starting etcd we bail out early without ever starting etcd when the test was invoked with -help. Otherwise etcd must be available, gets started and then hangs because flag.Parse itself exits when called by testing.go. This bypasses the code in EtcdMain which normally stops etcd.
This commit is contained in:
@@ -17,13 +17,11 @@ limitations under the License.
|
||||
package benchmark
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kubernetes/test/integration/framework"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
framework.EtcdMain(m.Run)
|
||||
}
|
||||
|
Reference in New Issue
Block a user