Skip to content

Comments

Init BindGen unit tests#8650

Merged
Spacesai1or merged 1 commit intodevelopfrom
wyatt/predeploys/init-unit-tests
Dec 21, 2023
Merged

Init BindGen unit tests#8650
Spacesai1or merged 1 commit intodevelopfrom
wyatt/predeploys/init-unit-tests

Conversation

@Spacesai1or
Copy link
Contributor

@Spacesai1or Spacesai1or commented Dec 17, 2023

Adds unit tests for removeDeploymentSalt helper method

@Spacesai1or
Copy link
Contributor Author

Spacesai1or commented Dec 17, 2023

This was referenced Dec 17, 2023
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 3d16392 to 72fae62 Compare December 17, 2023 00:28
@Spacesai1or Spacesai1or marked this pull request as ready for review December 17, 2023 00:38
Copy link
Contributor

@hamdiallam hamdiallam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Can you add some comments about where the test cases come from and how the reader can reproduce them?

@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from 613e08f to e2f2b2c Compare December 18, 2023 23:12
@Spacesai1or Spacesai1or requested a review from a team as a code owner December 18, 2023 23:12
@Spacesai1or Spacesai1or requested review from protolambda and removed request for a team December 18, 2023 23:12
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 72fae62 to 256591b Compare December 18, 2023 23:12
@semgrep-app
Copy link
Contributor

semgrep-app bot commented Dec 18, 2023

Semgrep found 1 iterate-over-empty-map finding:

  • op-batcher/compressor/compressors.go: L12-23

Iteration over a possibly empty map Kinds. This is likely a bug or redundant code

Ignore this finding from iterate-over-empty-map.

@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from e2f2b2c to 5a37ac8 Compare December 18, 2023 23:17
@Spacesai1or Spacesai1or requested a review from a team as a code owner December 18, 2023 23:17
@Spacesai1or Spacesai1or requested review from tynes and removed request for a team December 18, 2023 23:17
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch 2 times, most recently from 7e74857 to e7a3b46 Compare December 18, 2023 23:41
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from e7a3b46 to 1d0061c Compare December 18, 2023 23:43
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from 5a37ac8 to 58c960d Compare December 19, 2023 00:10
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 1d0061c to f66fef3 Compare December 19, 2023 00:10
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from 58c960d to 685aa4d Compare December 19, 2023 00:41
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from f66fef3 to 263a01b Compare December 19, 2023 00:41
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from 685aa4d to a007167 Compare December 19, 2023 04:41
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 263a01b to 2211006 Compare December 19, 2023 04:41
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from a007167 to 357b33a Compare December 20, 2023 01:32
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 2211006 to e20ca02 Compare December 20, 2023 01:32
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from 357b33a to 61af084 Compare December 20, 2023 01:34
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from e20ca02 to 787bf32 Compare December 20, 2023 01:34
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/l2-genesis-generation branch from 61af084 to 21dc425 Compare December 20, 2023 01:40
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 787bf32 to a52992e Compare December 20, 2023 01:40
Base automatically changed from wyatt/bindgen/l2-genesis-generation to develop December 20, 2023 23:48
@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from a52992e to 3abbc79 Compare December 21, 2023 00:25
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 21, 2023

Walkthrough

Walkthrough

The recent updates involve adding test cases and functions for verifying the functionality of removing deployment salt from contract initialization code. Two sets of test cases have been introduced, one for expected successes and another for expected failures. Correspondingly, two new test functions have been added to execute these tests and ensure the removeDeploymentSalt method works correctly under various scenarios.

Changes

File Change Summary
.../op-bindings/bindgen/fixtures_test.go Provides test cases for removing deployment salt from bytecode during contract initialization. Defines test data for successful and failed scenarios of removing deployment salt.
.../op-bindings/bindgen/remote_handlers_test.go Includes test functions TestRemoveDeploymentSalt and TestRemoveDeploymentSaltFailures for the bindGenGeneratorRemote type, testing the removeDeploymentSalt method with various scenarios.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@Spacesai1or Spacesai1or force-pushed the wyatt/predeploys/init-unit-tests branch from 3abbc79 to 97ca42b Compare December 21, 2023 00:32
@Spacesai1or Spacesai1or added this pull request to the merge queue Dec 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 21, 2023
@Spacesai1or Spacesai1or added this pull request to the merge queue Dec 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 21, 2023
@Spacesai1or Spacesai1or added this pull request to the merge queue Dec 21, 2023
Merged via the queue into develop with commit fd3e7e8 Dec 21, 2023
@Spacesai1or Spacesai1or deleted the wyatt/predeploys/init-unit-tests branch December 21, 2023 02:33
roberto-bayardo pushed a commit to roberto-bayardo/optimism that referenced this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants