Skip to content

Commit

Permalink
[release-18.0] Replace ErrorContains checks with Error checks before …
Browse files Browse the repository at this point in the history
…running upgrade downgrade (#16701)

Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 authored Sep 3, 2024
1 parent 3ba8b8c commit da4aa79
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ jobs:
cp -R bin /tmp/vitess-build-other/
rm -Rf bin/*
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n
- name: Use last release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ jobs:
cp -R bin /tmp/vitess-build-other/
rm -Rf bin/*
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n
- name: Use next release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ jobs:
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Running a test with vtgate and vttablet using version n
- name: Run query serving tests (vtgate=N, vttablet=N)
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ jobs:
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Running a test with vtgate and vttablet using version n
- name: Run query serving tests (vtgate=N, vttablet=N)
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down

0 comments on commit da4aa79

Please sign in to comment.