(t *testing.T)
| 2606 | // }) |
| 2607 | } |
| 2608 | func TestHttpServer_MultipleUpstreams(t *testing.T) { |
| 2609 | t.Run("UpstreamNotAllowedByDirectiveViaHeaders", func(t *testing.T) { |
| 2610 | cfg := &common.Config{ |
| 2611 | Server: &common.ServerConfig{ |
| 2612 | MaxTimeout: common.Duration(10 * time.Second).Ptr(), |
| 2613 | }, |
| 2614 | Projects: []*common.ProjectConfig{ |
| 2615 | { |
| 2616 | Id: "test_project", |
| 2617 | Networks: []*common.NetworkConfig{ |
| 2618 | { |
| 2619 | Architecture: common.ArchitectureEvm, |
| 2620 | Evm: &common.EvmNetworkConfig{ |
| 2621 | ChainId: 123, |
| 2622 | }, |
| 2623 | Failsafe: []*common.FailsafeConfig{ |
| 2624 | { |
| 2625 | Retry: nil, |
| 2626 | CircuitBreaker: nil, |
| 2627 | Hedge: nil, |
| 2628 | Timeout: nil, |
| 2629 | }, |
| 2630 | }, |
| 2631 | }, |
| 2632 | }, |
| 2633 | Upstreams: []*common.UpstreamConfig{ |
| 2634 | { |
| 2635 | Id: "rpc1", |
| 2636 | Type: common.UpstreamTypeEvm, |
| 2637 | Endpoint: "http://rpc1.localhost", |
| 2638 | Evm: &common.EvmUpstreamConfig{ |
| 2639 | ChainId: 123, |
| 2640 | }, |
| 2641 | Failsafe: []*common.FailsafeConfig{ |
| 2642 | { |
| 2643 | Retry: nil, |
| 2644 | CircuitBreaker: nil, |
| 2645 | Hedge: nil, |
| 2646 | Timeout: nil, |
| 2647 | }, |
| 2648 | }, |
| 2649 | }, |
| 2650 | { |
| 2651 | Id: "rpc2", |
| 2652 | Type: common.UpstreamTypeEvm, |
| 2653 | Endpoint: "http://rpc2.localhost", |
| 2654 | Evm: &common.EvmUpstreamConfig{ |
| 2655 | ChainId: 123, |
| 2656 | }, |
| 2657 | Failsafe: []*common.FailsafeConfig{ |
| 2658 | { |
| 2659 | Retry: nil, |
| 2660 | CircuitBreaker: nil, |
| 2661 | Hedge: nil, |
| 2662 | Timeout: nil, |
| 2663 | }, |
| 2664 | }, |
| 2665 | }, |
nothing calls this directly
no test coverage detected