From 3c71af56b28133604324dab37490551858c9224f Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 8 Apr 2024 10:00:00 +0800 Subject: [PATCH] fix test case --- driver/driver.go | 4 ++-- driver/driver_test.go | 2 +- prover/event_handler/transition_proved_test.go | 2 +- prover/prover_test.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/driver/driver.go b/driver/driver.go index 0fde82544..df2beba03 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -2,7 +2,7 @@ package driver import ( "context" - "errors" + "fmt" "sync" "time" @@ -65,7 +65,7 @@ func (d *Driver) InitFromConfig(ctx context.Context, cfg *Config) (err error) { if syncMode, err := d.rpc.L2.GetSyncMode(d.ctx); err != nil { return err } else if syncMode != d.SyncMode { - return errors.New("the type is inconsistent with taiko-geth's sync mode") + return fmt.Errorf("the type is inconsistent with taiko-geth's sync mode, expect: %s, actual: %s", syncMode, d.SyncMode) } if d.state, err = state.New(d.ctx, d.rpc); err != nil { diff --git a/driver/driver_test.go b/driver/driver_test.go index d0048577a..6d426b9be 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -38,7 +38,7 @@ func (s *DriverTestSuite) SetupTest() { d := new(Driver) ctx, cancel := context.WithCancel(context.Background()) s.Nil(d.InitFromConfig(ctx, &Config{ - SyncMode: downloader.SnapSync.String(), + SyncMode: downloader.FullSync.String(), ClientConfig: &rpc.ClientConfig{ L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), diff --git a/prover/event_handler/transition_proved_test.go b/prover/event_handler/transition_proved_test.go index 100970467..eb9880518 100644 --- a/prover/event_handler/transition_proved_test.go +++ b/prover/event_handler/transition_proved_test.go @@ -41,7 +41,7 @@ func (s *EventHandlerTestSuite) SetupTest() { d := new(driver.Driver) s.Nil(d.InitFromConfig(context.Background(), &driver.Config{ - SyncMode: downloader.SnapSync.String(), + SyncMode: downloader.FullSync.String(), ClientConfig: &rpc.ClientConfig{ L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"), diff --git a/prover/prover_test.go b/prover/prover_test.go index 301d98063..c22d7d223 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -56,7 +56,7 @@ func (s *ProverTestSuite) SetupTest() { d := new(driver.Driver) s.Nil(d.InitFromConfig(context.Background(), &driver.Config{ - SyncMode: downloader.SnapSync.String(), + SyncMode: downloader.FullSync.String(), ClientConfig: &rpc.ClientConfig{ L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"), L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),