From 245704ed836ac6325469af4579897684d9cc09ed Mon Sep 17 00:00:00 2001 From: Victor Castell <0x@vcastellm.xyz> Date: Thu, 4 Jan 2024 15:12:32 +0100 Subject: [PATCH] Add more tests --- interop/executor_test.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/interop/executor_test.go b/interop/executor_test.go index 8ee89f0..3f9c497 100644 --- a/interop/executor_test.go +++ b/interop/executor_test.go @@ -33,7 +33,9 @@ func TestNewExecutor(t *testing.T) { func TestExecutor_CheckTx(t *testing.T) { cfg := &config.Config{ - // Set your desired config values here + FullNodeRPCs: map[common.Address]string{ + common.HexToAddress("0x1234567890abcdef"): "http://localhost:8545", + }, } interopAdminAddr := common.HexToAddress("0x1234567890abcdef") etherman := &test.EthermanMock{} @@ -55,4 +57,18 @@ func TestExecutor_CheckTx(t *testing.T) { err := executor.CheckTx(context.Background(), signedTx) assert.NoError(t, err) + + signedTx = tx.SignedTx{ + Tx: tx.Tx{ + LastVerifiedBatch: 0, + NewVerifiedBatch: 1, + ZKP: tx.ZKP{ + Proof: []byte("sampleProof"), + }, + L1Contract: common.HexToAddress("0xdeadbeef"), + }, + } + + err = executor.CheckTx(context.Background(), signedTx) + assert.Error(t, err) }