Revision 35c6ea7a6794aeb67c1a6aa0a9452f2871902119 authored by Gyuho Lee on 27 March 2018, 17:31:05 UTC, committed by Joe Betz on 28 March 2018, 19:39:59 UTC
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
1 parent 8eeab58
Raw File
main_test.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package e2e

import (
	"flag"
	"os"
	"runtime"
	"testing"

	"github.com/coreos/etcd/pkg/testutil"
)

var binDir string
var certDir string

func TestMain(m *testing.M) {
	os.Setenv("ETCD_UNSUPPORTED_ARCH", runtime.GOARCH)
	os.Unsetenv("ETCDCTL_API")

	flag.StringVar(&binDir, "bin-dir", "../bin", "The directory for store etcd and etcdctl binaries.")
	flag.StringVar(&certDir, "cert-dir", "../integration/fixtures", "The directory for store certificate files.")
	flag.Parse()

	v := m.Run()
	if v == 0 && testutil.CheckLeakedGoroutine() {
		os.Exit(1)
	}
	os.Exit(v)
}
back to top