From d21b97a0dd11b5aaca25d10fe7a46228c69a63c2 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 3 Oct 2024 00:51:29 +0200 Subject: [PATCH] improve tests again Signed-off-by: Tim Vaillancourt --- go/vt/vtctl/reparentutil/emergency_reparenter_test.go | 2 +- go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/vt/vtctl/reparentutil/emergency_reparenter_test.go b/go/vt/vtctl/reparentutil/emergency_reparenter_test.go index 9f97fdb6c29..356e28ba202 100644 --- a/go/vt/vtctl/reparentutil/emergency_reparenter_test.go +++ b/go/vt/vtctl/reparentutil/emergency_reparenter_test.go @@ -1900,7 +1900,7 @@ func TestEmergencyReparenter_reparentShardLocked(t *testing.T) { err := erp.reparentShardLocked(ctx, ev, tt.keyspace, tt.shard, tt.emergencyReparentOps) if tt.shouldErr { assert.Error(t, err) - assert.Contains(t, err.Error(), tt.errShouldContain) + assert.ErrorContains(t, err, tt.errShouldContain) return } diff --git a/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go b/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go index 7edcd65b6d6..0194c29277f 100644 --- a/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go +++ b/go/vt/vtctl/reparentutil/planned_reparenter_flaky_test.go @@ -3396,7 +3396,7 @@ func TestPlannedReparenter_reparentShardLocked(t *testing.T) { if tt.shouldErr { assert.Error(t, err) if tt.errShouldContain != "" { - assert.Contains(t, err.Error(), tt.errShouldContain) + assert.ErrorContains(t, err, tt.errShouldContain) } return }