28 lines
394 B
Go
28 lines
394 B
Go
package grpc_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"gotemplate/api/grpc/spec"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestQuery(t *testing.T) {
|
|
ctx := context.Background()
|
|
|
|
conn, cleanup := createDependencies(t, ctx)
|
|
defer cleanup()
|
|
|
|
client := spec.NewQueryServiceClient(conn)
|
|
|
|
id := "sample_id"
|
|
|
|
_, err := client.Get(ctx, &spec.IdMessage{
|
|
Id: id,
|
|
})
|
|
|
|
assert.NotNil(t, err)
|
|
}
|