Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Jan 4, 2024
1 parent 72afdc4 commit 245704e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion interop/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand All @@ -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)
}

0 comments on commit 245704e

Please sign in to comment.