Skip to content

Commit

Permalink
Add GetPosition unit test for the server (#25)
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <bang.fu@zilliz.com>
  • Loading branch information
SimFG authored Nov 9, 2023
1 parent 3e2f520 commit f3bfc76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Configuration File for CodeCov
codecov:
notify:
require_ci_to_pass: yes
require_ci_to_pass: false

coverage:
precision: 2
Expand Down
8 changes: 8 additions & 0 deletions server/handle_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,12 @@ func TestRequestHandle(t *testing.T) {
assertion.NoError(err)
_, err = handler.handle(baseAPI, &request.GetRequest{})
assertion.Error(err)

handler, ok = requestHandlers[request.GetPosition]
assertion.True(ok)
assertion.IsType(&request.GetPositionRequest{}, handler.generateModel())
_, err = handler.handle(baseAPI, &request.GetPositionRequest{})
assertion.NoError(err)
_, err = handler.handle(baseAPI, &request.ListRequest{})
assertion.Error(err)
}

0 comments on commit f3bfc76

Please sign in to comment.