Skip to content

Commit

Permalink
e2e: add flag to pass specific binary path for last release.
Browse files Browse the repository at this point in the history
Signed-off-by: Siyuan Zhang <[email protected]>
  • Loading branch information
siyuanfoundation committed May 1, 2024
1 parent ce45881 commit 8e41a69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions tests/framework/e2e/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func InitFlags() {
certDirDef := FixturesDir

binDir := flag.String("bin-dir", binDirDef, "The directory for store etcd and etcdctl binaries.")
binLastRelease := flag.String("bin-last-release", "", "The path for the last release etcd binary.")

flag.StringVar(&CertDir, "cert-dir", certDirDef, "The directory for store certificate files.")
flag.Parse()

Expand All @@ -79,6 +81,9 @@ func InitFlags() {
Etcdutl: *binDir + "/etcdutl",
LazyFS: *binDir + "/lazyfs",
}
if *binLastRelease != "" {
BinPath.EtcdLastRelease = *binLastRelease
}
CertPath = CertDir + "/server.crt"
PrivateKeyPath = CertDir + "/server.key.insecure"
CaPath = CertDir + "/ca.crt"
Expand Down
7 changes: 5 additions & 2 deletions tests/robustness/makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ test-robustness-reports: export GOTOOLCHAIN := go$(shell cat .go-version)
test-robustness-reports:
cd ./tests && go test ./robustness/validate -v --count 1 --run TestDataReports

test-robustness-release-3.6: /tmp/etcd-release-3.5-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-last-release=/tmp/etcd-release-3.5-failpoints/bin/etcd" make test-robustness

# Test previous release branches

.PHONY: test-robustness-release-3.5
test-robustness-release-3.5: /tmp/etcd-release-3.5-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.5-failpoints/bin" make test-robustness
test-robustness-release-3.5: /tmp/etcd-release-3.5-failpoints/bin /tmp/etcd-release-3.4-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.5-failpoints/bin --bin-last-release=/tmp/etcd-release-3.4-failpoints/bin/etcd" make test-robustness

.PHONY: test-robustness-release-3.4
test-robustness-release-3.4: /tmp/etcd-release-3.4-failpoints/bin
Expand Down

0 comments on commit 8e41a69

Please sign in to comment.