efe87321b2
Testing Tweaks * parallel * slowestquery * split * cleanup * health * dynamiccores * go * profile * timeout * commitmychanges * taskfile * sqlcheckstart * client * cost * ctxtimeout
24 lines
501 B
Go
24 lines
501 B
Go
package test_test
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"queryorchestration/internal/test"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestAssertStringToReader(t *testing.T) {
|
|
t.Run("pass", func(t *testing.T) {
|
|
mockT := &testing.T{}
|
|
test.AssertStringToReader(t, "hi", strings.NewReader("hi"))
|
|
assert.False(t, mockT.Failed())
|
|
})
|
|
t.Run("fail", func(t *testing.T) {
|
|
mockT := &testing.T{}
|
|
test.AssertStringToReader(mockT, "bye", strings.NewReader("hi"))
|
|
assert.True(t, mockT.Failed())
|
|
})
|
|
}
|