-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathservice_test.go
More file actions
38 lines (33 loc) · 842 Bytes
/
service_test.go
File metadata and controls
38 lines (33 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package opnode
import (
"testing"
"github.com/ethereum-optimism/optimism/op-node/flags"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
)
func syncConfigCliApp() *cli.App {
syncConfigFlags := append([]cli.Flag{
flags.SequencerEnabledFlag,
flags.L2EngineSyncEnabled,
flags.SyncModeFlag,
flags.SyncModeReqRespFlag,
flags.L2FollowSource,
flags.L2EngineKind,
flags.SkipSyncStartCheck,
}, flags.P2PFlags("")..., // For p2p.sync.req-resp
)
return &cli.App{
Flags: syncConfigFlags,
Action: func(c *cli.Context) error {
_, err := NewSyncConfig(c, log.New())
return err
},
}
}
func run(args []string) error {
return syncConfigCliApp().Run(append([]string{"test"}, args...))
}
func TestNewSyncConfigDefault(t *testing.T) {
require.NoError(t, run(nil))
}