ClickHouse/programs/diagnostics/internal/platform/data/bundle_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
530 B
Go
Raw Normal View History

2022-04-27 12:22:20 +00:00
package data_test
import (
"testing"
"github.com/ClickHouse/ClickHouse/programs/diagnostics/internal/platform/data"
2022-04-27 12:22:20 +00:00
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
)
func TestBundleError(t *testing.T) {
t.Run("can get a bundle error", func(t *testing.T) {
errs := make([]error, 3)
errs[0] = errors.New("Error 1")
errs[1] = errors.New("Error 2")
errs[2] = errors.New("Error 3")
fErrors := data.FrameErrors{
Errors: errs,
}
require.Equal(t, `Error 1
Error 2
Error 3`, fErrors.Error())
})
}