blob: 41a1c15b030fce398f63df1bbf18ecbf467ded54 [file] [log] [blame]
package cockroachdb
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestFindCockroach(t *testing.T) {
path, err := FindCockroach()
require.NoError(t, err)
assertFileExists(t, path)
}
func assertFileExists(t *testing.T, path string) {
fileInfo, err := os.Stat(path)
require.NoError(t, err)
assert.False(t, fileInfo.IsDir())
assert.NotZero(t, fileInfo.Size())
}