mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
rpc/apimiddleware: Test all paths can be created (#13073)
This commit is contained in:
@@ -32,6 +32,7 @@ go_test(
|
||||
srcs = [
|
||||
"custom_handlers_test.go",
|
||||
"custom_hooks_test.go",
|
||||
"endpoint_factory_test.go",
|
||||
"structs_marshalling_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
|
||||
17
beacon-chain/rpc/apimiddleware/endpoint_factory_test.go
Normal file
17
beacon-chain/rpc/apimiddleware/endpoint_factory_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package apimiddleware_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/apimiddleware"
|
||||
"github.com/prysmaticlabs/prysm/v4/testing/require"
|
||||
)
|
||||
|
||||
func TestBeaconEndpointFactory_AllPathsRegistered(t *testing.T) {
|
||||
f := &apimiddleware.BeaconEndpointFactory{}
|
||||
|
||||
for _, p := range f.Paths() {
|
||||
_, err := f.Create(p)
|
||||
require.NoError(t, err, "failed to register %s", p)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user