From dddf1c20e008a3803de0655d83415c27d217977d Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Thu, 23 May 2024 15:56:38 -0400 Subject: [PATCH] Fix backup tests Signed-off-by: Matt Lord --- go/test/endtoend/cluster/vttablet_process.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/test/endtoend/cluster/vttablet_process.go b/go/test/endtoend/cluster/vttablet_process.go index 0c2852b569b..6bd60b63191 100644 --- a/go/test/endtoend/cluster/vttablet_process.go +++ b/go/test/endtoend/cluster/vttablet_process.go @@ -445,6 +445,9 @@ func (vttablet *VttabletProcess) TearDownWithTimeout(timeout time.Duration) erro // CreateDB creates the database for keyspace func (vttablet *VttabletProcess) CreateDB(keyspace string) error { + if vttablet.DbName == "" { + vttablet.DbName = "vt_" + keyspace + } _, _ = vttablet.QueryTablet(fmt.Sprintf("drop database IF EXISTS %s", vttablet.DbName), keyspace, false) _, err := vttablet.QueryTablet(fmt.Sprintf("create database IF NOT EXISTS %s", vttablet.DbName), keyspace, false) return err