mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
d17996f8b0
* Update V3 from V4 * Fix build v3 -> v4 * Update ssz * Update beacon_chain.pb.go * Fix formatter import * Update update-mockgen.sh comment to v4 * Fix conflicts. Pass build and tests * Fix test
24 lines
604 B
Go
24 lines
604 B
Go
package attestations
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/testing/assert"
|
|
"github.com/prysmaticlabs/prysm/v4/testing/require"
|
|
)
|
|
|
|
func TestStop_OK(t *testing.T) {
|
|
s, err := NewService(context.Background(), &Config{})
|
|
require.NoError(t, err)
|
|
require.NoError(t, s.Stop(), "Unable to stop attestation pool service")
|
|
assert.ErrorContains(t, context.Canceled.Error(), s.ctx.Err(), "Context was not canceled")
|
|
}
|
|
|
|
func TestStatus_Error(t *testing.T) {
|
|
err := errors.New("bad bad bad")
|
|
s := &Service{err: err}
|
|
assert.ErrorContains(t, s.err.Error(), s.Status())
|
|
}
|