--------------------------------------------------------------------------- newTestBridgeWithRPC creates a Bridge connected to a real gRPC client, bypassing NewBridge (which requires mTLS auth files). ---------------------------------------------------------------------------
(t *testing.T, rpcClient listenerrpc.ListenerRPCClient)
| 329 | // --------------------------------------------------------------------------- |
| 330 | |
| 331 | func newTestBridgeWithRPC(t *testing.T, rpcClient listenerrpc.ListenerRPCClient) *Bridge { |
| 332 | t.Helper() |
| 333 | ctx, cancel := context.WithCancel(context.Background()) |
| 334 | return &Bridge{ |
| 335 | cfg: &cfgpkg.C2BridgeConfig{ |
| 336 | ListenerName: "test-listener", |
| 337 | ListenerIP: "127.0.0.1", |
| 338 | PipelineName: "test-pipeline", |
| 339 | }, |
| 340 | rpc: rpcClient, |
| 341 | listenerID: "test-listener", |
| 342 | pipelineID: "test-pipeline", |
| 343 | registry: buildDefaultRegistry(), |
| 344 | taskManager: NewTaskManager(), |
| 345 | ctx: ctx, |
| 346 | cancel: cancel, |
| 347 | } |
| 348 | } |
no test coverage detected