Skip to content

CLI options tests - check error first; fix typo rpl#8666

Merged
macfarla merged 2 commits intobesu-eth:mainfrom
macfarla:rpl
May 22, 2025
Merged

CLI options tests - check error first; fix typo rpl#8666
macfarla merged 2 commits intobesu-eth:mainfrom
macfarla:rpl

Conversation

@macfarla
Copy link
Copy Markdown
Contributor

PR description

Related to #8662 - if the besu command errors, the commandOutput is empty, and if that's checked first, you don't see what the error is. with the order reversed, if there's an error, it will be visible.

Think it only affects tests that are asserting something specific about the commandOutput so I updated all those spots

eg

checking the commandOutput first you'd get

Expecting actual:
  ""
to start with:
  "Unstable options"

whereas if you check the error first, you get

Expecting empty but was: "picocli.CommandLine$DuplicateOptionAnnotationsException: Option name '--Xbonsai-full-flat-db-enabled' is used by both field Boolean org.hyperledger.besu.cli.options.storage.PathBasedExtraStorageOptions$Unstable.fullFlatDbEnabled and field Boolean org.hyperledger.besu.cli.options.storage.PathBasedExtraStorageOptions$Unstable.fullFlatDbEnabled
"
java.lang.AssertionError: 
Expecting empty but was: "picocli.CommandLine$DuplicateOptionAnnotationsException: Option name '--Xbonsai-full-flat-db-enabled' is used by both field Boolean org.hyperledger.besu.cli.options.storage.PathBasedExtraStorageOptions$Unstable.fullFlatDbEnabled and field Boolean org.hyperledger.besu.cli.options.storage.PathBasedExtraStorageOptions$Unstable.fullFlatDbEnabled
"

Also fixed a typo RPL/RLP

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Copy link
Copy Markdown
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

LGTM

@macfarla macfarla enabled auto-merge (squash) May 22, 2025 07:28
@macfarla macfarla merged commit 771e06c into besu-eth:main May 22, 2025
48 checks passed
@macfarla macfarla deleted the rpl branch May 28, 2025 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants