mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #15644 from serathius/robustness-etcdctl-provided
tests/robustness: Ensure that etcdctl binary is provided
This commit is contained in:
commit
99df35e69b
19
.github/workflows/robustness-template.yaml
vendored
19
.github/workflows/robustness-template.yaml
vendored
@ -25,38 +25,31 @@ jobs:
|
||||
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: '1.19.7'
|
||||
- name: build
|
||||
- name: test-robustness
|
||||
env:
|
||||
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
mkdir -p bin
|
||||
# Use --failfast to avoid overriding report generated by failed test
|
||||
GO_TEST_FLAGS="-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness"
|
||||
case "${ETCD_BRANCH}" in
|
||||
release-3.5)
|
||||
make /tmp/etcd-release-3.5-failpoints/bin/etcd
|
||||
cp /tmp/etcd-release-3.5-failpoints/bin/etcd bin/etcd
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.5
|
||||
;;
|
||||
release-3.4)
|
||||
make /tmp/etcd-release-3.4-failpoints/bin/etcd
|
||||
cp /tmp/etcd-release-3.4-failpoints/bin/etcd bin/etcd
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.4
|
||||
;;
|
||||
main)
|
||||
make gofail-enable
|
||||
make build
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness
|
||||
;;
|
||||
*)
|
||||
echo "Failed to find target ${ETCD_BRANCH}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
./bin/etcd --version
|
||||
- name: test-robustness
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Use --failfast to avoid overriding report generated by failed test
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness' RESULTS_DIR=/tmp/results make test-robustness
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
|
@ -937,6 +937,7 @@ func (epc *EtcdProcessCluster) WaitMembersForLeader(ctx context.Context, t testi
|
||||
if err == nil || strings.Contains(err.Error(), "Key not found") {
|
||||
break
|
||||
}
|
||||
t.Logf("WaitMembersForLeader Get err: %v", err)
|
||||
}
|
||||
|
||||
leaders := make(map[uint64]struct{})
|
||||
|
@ -1,3 +1,13 @@
|
||||
# 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
|
||||
|
||||
.PHONY: test-robustness-release-3.4
|
||||
test-robustness-release-3.4: /tmp/etcd-release-3.4-failpoints/bin
|
||||
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.4-failpoints/bin" make test-robustness
|
||||
|
||||
# Reproduce historical issues
|
||||
|
||||
.PHONY: test-robustness-issue14370
|
||||
@ -63,7 +73,7 @@ install-gofail:
|
||||
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
|
||||
FAILPOINTS=true ./build;
|
||||
|
||||
/tmp/etcd-release-3.5-failpoints/bin/etcd: install-gofail
|
||||
/tmp/etcd-release-3.5-failpoints/bin: install-gofail
|
||||
rm -rf /tmp/etcd-release-3.5-failpoints/
|
||||
mkdir -p /tmp/etcd-release-3.5-failpoints/
|
||||
cd /tmp/etcd-release-3.5-failpoints/; \
|
||||
@ -83,7 +93,7 @@ install-gofail:
|
||||
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
|
||||
FAILPOINTS=true ./build;
|
||||
|
||||
/tmp/etcd-release-3.4-failpoints/bin/etcd: install-gofail
|
||||
/tmp/etcd-release-3.4-failpoints/bin: install-gofail
|
||||
rm -rf /tmp/etcd-release-3.4-failpoints/
|
||||
mkdir -p /tmp/etcd-release-3.4-failpoints/
|
||||
cd /tmp/etcd-release-3.4-failpoints/; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user