Skip to content

Commit

Permalink
fix: panic with the gRPC test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Jan 15, 2024
1 parent d6da4ca commit 4c75f3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
8 changes: 8 additions & 0 deletions e2e/test-suite-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkg/runner/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down

0 comments on commit 4c75f3a

Please sign in to comment.