mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
16 lines
363 B
Go
16 lines
363 B
Go
|
package grpc_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/kava-labs/kava/client/grpc"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestNewClient_InvalidEndpoint(t *testing.T) {
|
||
|
_, err := grpc.NewClient("invalid-url")
|
||
|
require.ErrorContains(t, err, "unknown grpc url scheme")
|
||
|
_, err = grpc.NewClient("")
|
||
|
require.ErrorContains(t, err, "grpc url cannot be empty")
|
||
|
}
|