Skip to content

Commit

Permalink
Fixed error code 1
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLord017 committed Oct 10, 2024
1 parent ccb63d9 commit 35e3174
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions consensus/rpc/nimbus_rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestNewNimbusRpc(t *testing.T) {
rpcURL := "http://example.com"
nimbusRpc := NewNimbusRpc(rpcURL)
Expand Down Expand Up @@ -42,6 +43,11 @@ func TestNimbusGetBootstrap(t *testing.T) {
assert.Equal(t, uint64(1000), bootstrap.Header.Slot)
}
func TestNimbusGetUpdates(t *testing.T) {
defer func() {
if r := recover(); r != nil {
t.Errorf("Test panicked: %v", r)
}
}()
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, "/eth/v1/beacon/light_client/updates", r.URL.Path)
assert.Equal(t, "start_period=1000&count=5", r.URL.RawQuery)
Expand Down

0 comments on commit 35e3174

Please sign in to comment.