dapr / dapr/go-sdk

want examples of unit tests

Open
#322 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
479
Forks
187
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

I'm writing an application that using Dapr Service-to-service invocation. I want to write unit tests for service hander, but I can't find any document to do that.

**Describe the solution you'd like**

There is a example will be helpful, maybe like
https://github.com/dapr/go-sdk/blob/main/examples/service/serving/grpc/main_test.go for https://github.com/dapr/go-sdk/blob/main/examples/service/serving/grpc/main.go

Contributor guide

Open the contributing guide

Research direction

Start by comparing the referenced examples/service/serving/grpc/main.go and main_test.go in dapr/go-sdk, then inspect the corresponding service-to-service invocation example in this repository. Add a clearly placed unit-test example for the service handler and verify that it demonstrates the requested testing approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation, testing
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.