Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Renan Rangel <rrangel@slack-corp.com>
  • Loading branch information
rvrangel committed Aug 22, 2024
1 parent a08b8e1 commit f4f6451
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/test/endtoend/backup/vtctlbackup/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f4f6451

Please sign in to comment.