RunCLITest can be used in a TestMain function for CLI tests. It takes care of launching an authorization server as well as a gRPC server with the selected services supplied as options. It also automatically issues a login command to the auth service. Since this function is primarily used in a TestM
(m *testing.M, opts ...server.StartGRPCServerOption)
| 75 | // Since this function is primarily used in a TestMain and no testing.T object is available at this |
| 76 | // point, this function WILL panic on errors. |
| 77 | func RunCLITest(m *testing.M, opts ...server.StartGRPCServerOption) (code int) { |
| 78 | ret, err := RunCLITestFunc(m.Run, opts...) |
| 79 | if err != nil { |
| 80 | panic(err) |
| 81 | } |
| 82 | |
| 83 | return *ret |
| 84 | } |
| 85 | |
| 86 | // RunCLITestFunc can be used to launch individual test functions with a gRPC server. It takes care of launching an |
| 87 | // authorization server as well as a gRPC server with the selected services supplied as options. It also automatically |