blob: 1fb8d814f6ccdcc8268022aa7890844aaca41b81 [file]
package backup
import (
"github.com/apache/cloudberry-go-libs/testhelper"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gbytes"
)
var _ = Describe("backup internal tests", func() {
var log *Buffer
BeforeEach(func() {
_, _, log = testhelper.SetupTestLogger()
})
Describe("backupData", func() {
It("returns successfully immediately if there is no table data to backup", func() {
emptyTableSlice := make([]Table, 0)
backupData(emptyTableSlice)
Expect(string(log.Contents())).To(ContainSubstring("Data backup complete"))
})
})
})