tests: Fix building incorrect etcd version and make switch strict

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
storage-doc
Marek Siarkowicz 2023-04-03 14:33:27 +02:00
parent 7c7f636aea
commit 9c72ecb1f9
4 changed files with 27 additions and 22 deletions

View File

@ -6,25 +6,25 @@ on:
schedule:
- cron: '25 9 * * *' # runs every day at 09:25 UTC
jobs:
test-main:
main:
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
uses: ./.github/workflows/robustness-template.yaml
with:
ref: main
etcdBranch: main
count: 100
testTimeout: 200m
artifactName: test-main
test-35:
artifactName: main
release-35:
uses: ./.github/workflows/robustness-template.yaml
with:
ref: release-3.5
etcdBranch: release-3.5
count: 100
testTimeout: 200m
artifactName: test-35
test-34:
artifactName: release-35
release-34:
uses: ./.github/workflows/robustness-template.yaml
with:
ref: release-3.4
etcdBranch: release-3.4
count: 100
testTimeout: 200m
artifactName: test-34
artifactName: release-34

View File

@ -2,7 +2,7 @@ name: Reusable Robustness Workflow
on:
workflow_call:
inputs:
ref:
etcdBranch:
required: true
type: string
count:
@ -27,11 +27,12 @@ jobs:
go-version: '1.19.7'
- name: build
env:
GITHUB_REF: ${{ inputs.ref }}
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
run: |
set -euo pipefail
case "${GITHUB_REF}" in
mkdir -p bin
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
@ -40,11 +41,15 @@ jobs:
make /tmp/etcd-release-3.4-failpoints/bin/etcd
cp /tmp/etcd-release-3.4-failpoints/bin/etcd bin/etcd
;;
*)
main)
make gofail-enable
make build
;;
esac
*)
echo "Failed to find target ${ETCD_BRANCH}"
exit 1
;;
esac
./bin/etcd --version
- name: test-robustness
run: |

View File

@ -2,10 +2,10 @@ name: Robustness
on: [push, pull_request]
permissions: read-all
jobs:
test:
main:
uses: ./.github/workflows/robustness-template.yaml
with:
ref: ${{ github.ref }}
etcdBranch: main
count: 15
testTimeout: 30m
artifactName: test
artifactName: main

View File

@ -41,7 +41,7 @@ install-gofail:
# Build previous releases for robustness tests
/tmp/etcd-v3.6.0-failpoints/bin:
/tmp/etcd-v3.6.0-failpoints/bin: install-gofail
rm -rf /tmp/etcd-v3.6.0-failpoints/
mkdir -p /tmp/etcd-v3.6.0-failpoints/
cd /tmp/etcd-v3.6.0-failpoints/; \
@ -52,7 +52,7 @@ install-gofail:
/tmp/etcd-v3.5.2-failpoints/bin:
/tmp/etcd-v3.5.4-failpoints/bin:
/tmp/etcd-v3.5.5-failpoints/bin:
/tmp/etcd-v3.5.%-failpoints/bin:
/tmp/etcd-v3.5.%-failpoints/bin: install-gofail
rm -rf /tmp/etcd-v3.5.$*-failpoints/
mkdir -p /tmp/etcd-v3.5.$*-failpoints/
cd /tmp/etcd-v3.5.$*-failpoints/; \
@ -63,7 +63,7 @@ install-gofail:
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;
/tmp/etcd-release-3.5-failpoints/bin/etcd:
/tmp/etcd-release-3.5-failpoints/bin/etcd: 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/; \
@ -75,7 +75,7 @@ install-gofail:
FAILPOINTS=true ./build;
/tmp/etcd-v3.4.23-failpoints/bin:
/tmp/etcd-v3.4.%-failpoints/bin:
/tmp/etcd-v3.4.%-failpoints/bin: install-gofail
rm -rf /tmp/etcd-v3.4.$*-failpoints/
mkdir -p /tmp/etcd-v3.4.$*-failpoints/
cd /tmp/etcd-v3.4.$*-failpoints/; \
@ -83,7 +83,7 @@ install-gofail:
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
FAILPOINTS=true ./build;
/tmp/etcd-release-3.4-failpoints/bin/etcd:
/tmp/etcd-release-3.4-failpoints/bin/etcd: 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/; \