Skip to content

Commit 131eba8

Browse files
[release-19.0] Replace ErrorContains checks with Error checks before running upgrade downgrade (#16700)
Signed-off-by: Manan Gupta <manan@planetscale.com>
1 parent cbe33ad commit 131eba8

4 files changed

+24
-0
lines changed

.github/workflows/upgrade_downgrade_test_query_serving_queries.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ jobs:
154154
cp -R bin /tmp/vitess-build-other/
155155
rm -Rf bin/*
156156
157+
- name: Convert ErrorContains checks to Error checks
158+
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
159+
run: |
160+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
161+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
162+
157163
# Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n
158164
- name: Use last release's VTGate
159165
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'

.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ jobs:
155155
cp -R bin /tmp/vitess-build-other/
156156
rm -Rf bin/*
157157
158+
- name: Convert ErrorContains checks to Error checks
159+
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
160+
run: |
161+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
162+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
163+
158164
# Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n
159165
- name: Use next release's VTGate
160166
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'

.github/workflows/upgrade_downgrade_test_query_serving_schema.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ jobs:
157157
mkdir -p /tmp/vitess-build-current/
158158
cp -R bin /tmp/vitess-build-current/
159159
160+
- name: Convert ErrorContains checks to Error checks
161+
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
162+
run: |
163+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
164+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
165+
160166
# Running a test with vtgate and vttablet using version n
161167
- name: Run query serving tests (vtgate=N, vttablet=N)
162168
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'

.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ jobs:
158158
mkdir -p /tmp/vitess-build-current/
159159
cp -R bin /tmp/vitess-build-current/
160160
161+
- name: Convert ErrorContains checks to Error checks
162+
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
163+
run: |
164+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
165+
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
166+
161167
# Running a test with vtgate and vttablet using version n
162168
- name: Run query serving tests (vtgate=N, vttablet=N)
163169
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'

0 commit comments

Comments
 (0)