fix: panic with the gRPC test cases (#334)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
This commit is contained in:
parent
d6da4ca694
commit
3f6b4a45f2
|
@ -56,10 +56,6 @@ jobs:
|
|||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
run: |
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r coverage.out
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r collector-coverage.out
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r store-orm-coverage.out
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r store-s3-coverage.out
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r store-git-coverage.out
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r operator/cover.out
|
||||
bash <(curl -Ls https://coverage.codacy.com/get.sh) final
|
||||
|
||||
|
|
|
@ -70,4 +70,5 @@ RUN apt update -y && \
|
|||
apt install -y --no-install-recommends ssh-client ca-certificates && \
|
||||
apt install -y curl
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["atest", "server", "--local-storage=/var/data/api-testing/*.yaml"]
|
||||
|
|
|
@ -91,6 +91,14 @@ items:
|
|||
expect:
|
||||
bodyFieldsExpect:
|
||||
api: http://localhost:8080/server.Runner
|
||||
- name: GetSuggestedAPIs
|
||||
request:
|
||||
api: /GetSuggestedAPIs
|
||||
method: POST
|
||||
body: |
|
||||
{
|
||||
"name": "{{.param.suiteName}}"
|
||||
}
|
||||
- name: createTestCase
|
||||
request:
|
||||
api: /CreateTestCase
|
||||
|
|
|
@ -77,6 +77,9 @@ func NewGRPCTestCaseRunner(host string, proto testing.RPCDesc) TestCaseRunner {
|
|||
|
||||
func init() {
|
||||
RegisterRunner("grpc", func(suite *testing.TestSuite) TestCaseRunner {
|
||||
if suite.Spec.RPC == nil {
|
||||
suite.Spec.RPC = &testing.RPCDesc{}
|
||||
}
|
||||
return NewGRPCTestCaseRunner(suite.API, *suite.Spec.RPC)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue