generated from PenaSide/GolangTemplate
add integration test for rpc client
This commit is contained in:
parent
aab18dfcec
commit
6806e0b912
26
tests/integration/rpc_clients_test.go
Normal file
26
tests/integration/rpc_clients_test.go
Normal file
@ -0,0 +1,26 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/zap"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/pkg/customer_clients"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_SetVerifyAccount(t *testing.T) {
|
||||
logger, err := zap.NewProduction()
|
||||
assert.NoError(t, err)
|
||||
ctx := context.Background()
|
||||
|
||||
customerClients := customer_clients.NewCustomersClient(customer_clients.CustomersClientDeps{
|
||||
Logger: logger,
|
||||
CustomerServiceHost: "localhost:9000",
|
||||
})
|
||||
|
||||
account, err := customerClients.SetVerifyAccount(ctx, "64e53ed187392e122e5d3d50", "nko")
|
||||
assert.NoError(t, err)
|
||||
fmt.Println(account.Status)
|
||||
assert.Equal(t, 0, int(account.Status))
|
||||
}
|
Loading…
Reference in New Issue
Block a user