From f4f64519d911e75ca52402771e8b64fc88073b32 Mon Sep 17 00:00:00 2001 From: Renan Rangel Date: Thu, 22 Aug 2024 07:26:25 -0700 Subject: [PATCH] fix unit test Signed-off-by: Renan Rangel --- go/test/endtoend/backup/vtctlbackup/backup_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/test/endtoend/backup/vtctlbackup/backup_test.go b/go/test/endtoend/backup/vtctlbackup/backup_test.go index 3a30ad5d31f..43d0830d126 100644 --- a/go/test/endtoend/backup/vtctlbackup/backup_test.go +++ b/go/test/endtoend/backup/vtctlbackup/backup_test.go @@ -27,6 +27,7 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/mysqlctl" ) @@ -190,7 +191,10 @@ func TestRestoreIgnoreBackups(t *testing.T) { // and try to restore from it err = localCluster.VtctldClientProcess.ExecuteCommand("RestoreFromBackup", replica2.Alias) - require.ErrorContains(t, err, "exit status 1") // this should fail + if err != nil { + log.Errorf("restore failed as expected: %v", err) + } + require.Error(t, err) // this should fail // now we retry but trying the earlier backup err = localCluster.VtctldClientProcess.ExecuteCommand("RestoreFromBackup", "--ignored-backup-engines=xtrabackup", replica2.Alias)