mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Include etcd-last-release in BinPath
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
0f9e15fc37
commit
9bba38e51f
@ -38,7 +38,7 @@ func TestDowngradeUpgradeClusterOf3(t *testing.T) {
|
||||
|
||||
func testDowngradeUpgrade(t *testing.T, clusterSize int) {
|
||||
currentEtcdBinary := e2e.BinPath.Etcd
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
t.Skipf("%q does not exist", lastReleaseBinary)
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ func TestTLSClusterOf3UsingDiscovery(t *testing.T) { testClusterUsingDiscovery(t
|
||||
func testClusterUsingDiscovery(t *testing.T, size int, peerTLS bool) {
|
||||
e2e.BeforeTest(t)
|
||||
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
t.Skipf("%q does not exist", lastReleaseBinary)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
// TestReleaseUpgrade ensures that changes to master branch does not affect
|
||||
// upgrade from latest etcd releases.
|
||||
func TestReleaseUpgrade(t *testing.T) {
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
t.Skipf("%q does not exist", lastReleaseBinary)
|
||||
}
|
||||
@ -113,7 +113,7 @@ func TestReleaseUpgrade(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestReleaseUpgradeWithRestart(t *testing.T) {
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
t.Skipf("%q does not exist", lastReleaseBinary)
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ import (
|
||||
)
|
||||
|
||||
func TestEtctlutlMigrate(t *testing.T) {
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
|
||||
tcs := []struct {
|
||||
name string
|
||||
|
@ -75,7 +75,7 @@ func TestV2DeprecationFlags(t *testing.T) {
|
||||
e2e.BeforeTest(t)
|
||||
dataDirPath := t.TempDir()
|
||||
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
t.Skipf("%q does not exist", lastReleaseBinary)
|
||||
}
|
||||
@ -101,7 +101,7 @@ func TestV2DeprecationSnapshotMatches(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
currentReleaseBinary := e2e.BinPath.Etcd
|
||||
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
@ -136,7 +136,7 @@ func TestV2DeprecationSnapshotRecover(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
lastReleaseBinary := e2e.BinDir + "/etcd-last-release"
|
||||
lastReleaseBinary := e2e.BinPath.EtcdLastRelease
|
||||
currentReleaseBinary := e2e.BinPath.Etcd
|
||||
|
||||
if !fileutil.Exist(lastReleaseBinary) {
|
||||
|
@ -40,9 +40,10 @@ func init() {
|
||||
|
||||
func initBinPathCov(binDir string) binPath {
|
||||
return binPath{
|
||||
Etcd: binDir + "/etcd_test",
|
||||
Etcdctl: binDir + "/etcdctl_test",
|
||||
Etcdutl: binDir + "/etcdutl_test",
|
||||
Etcd: binDir + "/etcd_test",
|
||||
EtcdLastRelease: binDir + "/etcd-last-release",
|
||||
Etcdctl: binDir + "/etcdctl_test",
|
||||
Etcdutl: binDir + "/etcdutl_test",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,9 +33,10 @@ func init() {
|
||||
|
||||
func initBinPathNoCov(binDir string) binPath {
|
||||
return binPath{
|
||||
Etcd: binDir + "/etcd",
|
||||
Etcdctl: binDir + "/etcdctl",
|
||||
Etcdutl: binDir + "/etcdutl",
|
||||
Etcd: binDir + "/etcd",
|
||||
EtcdLastRelease: binDir + "/etcd-last-release",
|
||||
Etcdctl: binDir + "/etcdctl",
|
||||
Etcdutl: binDir + "/etcdutl",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,9 +45,10 @@ var (
|
||||
)
|
||||
|
||||
type binPath struct {
|
||||
Etcd string
|
||||
Etcdctl string
|
||||
Etcdutl string
|
||||
Etcd string
|
||||
EtcdLastRelease string
|
||||
Etcdctl string
|
||||
Etcdutl string
|
||||
}
|
||||
|
||||
func InitFlags() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user