bfenetworks / bfe

A modern layer 7 load balancer from baidu
https://www.bfe-networks.net
Apache License 2.0
6.09k stars 942 forks source link

add more integration test cases #973

Open mileszhang2016 opened 2 years ago

mileszhang2016 commented 2 years ago

Discussed in https://github.com/bfenetworks/bfe/discussions/968

Originally posted by **kwanhur** January 23, 2022 when add some feature into `bfe_server`, it seems to add test case uncomfortably, needs to mock a mass of struct case for `BfeServer`, any other friendly ways?
kwanhur commented 2 years ago

There MockServer locate at bfe_util/mock_server, but seems lack relate usage doc.

I found two places had used it, bfe_http2/server_test and bfe_websocket.

When modification on bfe_server, good for a trial with the MockServer.

mileszhang2016 commented 2 years ago

The requirement of "Add support for setting up context (e.g., bfe_config, bfe_server) to ease unit testing", has been changed to "add more integration test cases"