Skip to content

test(integration): keep lifecycle negative checks in the echo suite - #1062

Merged
mbrandenburger merged 1 commit into
hyperledger:mainfrom
mbrandenburger:test/lifecycle-checks-in-echo
Nov 5, 2026
Merged

mbrandenburger merged 1 commit into
hyperledger:mainfrom
mbrandenburger:test/lifecycle-checks-in-echo

Conversation

@mbrandenburger

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
The C++ suites repeat the peer lifecycle negative checks: try_fail calls that pass an endorsement or validation plugin to approveformyorg, checkcommitreadiness and commit, which FPC rejects. These test the peer lifecycle wrapper, not the chaincode, so one suite is enough. This PR puts all of them in echo_test.sh:

  • echo_test.sh gains the -E mock-escc -V fpc-vscc variant of all three subcommands, next to the -E mock-escc one it already had. Before this PR, the -V fpc-vscc variant of checkcommitreadiness and commit was only tested in deployment_test.sh.
  • auction_test.sh drops its one try_fail (approveformyorg -E mock-escc -V fpc-vscc). It keeps its positive lifecycle steps.
  • deployment_test.sh stays as it is. It runs two FPC chaincodes and a non-FPC one on the same peer, and its try_fail lines are part of that setup.
  • kv_test.sh had none.

Chaincode checks (try_out_r … check_result) stay where they are: they test the chaincode, and each C++ suite tests a different one.

Removed Still covered by
auction_test.sh:37 approveformyorg -E mock-escc -V fpc-vscc echo_test.sh:37 (same subcommand and flags), and deployment_test.sh:92

After this PR, the try_fail lines (lines in sgx/integration/, common flags left out):

Suite:line Command Plugins
echo:36, echo:37 approveformyorg -E mock-escc; -E mock-escc -V fpc-vscc
echo:41, echo:42 checkcommitreadiness -E mock-escc; -E mock-escc -V fpc-vscc
echo:46, echo:47 commit -E mock-escc; -E mock-escc -V fpc-vscc
echo:51 initEnclave --name wrong-cc-id
echo:55 initEnclave (second call on an initialized enclave)
deployment:92,96,100,104 the three subcommands with -E mock-escc -V fpc-vscc, and initEnclave --name wrong-cc-id unchanged

Which issue(s) this PR fixes:
Fixes #1042. Part of #1044.

Special notes for your reviewer:

  • Check the table: each removed assertion needs a line that still covers it with the same subcommand and flags.
  • In the CI test (echo) log, each new try_fail should fail because the plugin is rejected, not because of a CLI usage error. I'll check this once CI has run and add the log lines here.
  • Each new line sits right after its -E mock-escc sibling and before the try that succeeds, so it runs while the chaincode is still unapproved and uncommitted, the same state the sibling runs in.

echo_test.sh now checks both plugin variants (-E mock-escc, and -E
mock-escc -V fpc-vscc) of approveformyorg, checkcommitreadiness and
commit, plus the two initEnclave checks. auction_test.sh had the only
other copy of an approveformyorg check, now covered by echo; it keeps
its positive lifecycle steps. deployment_test.sh is unchanged: its
checks are part of its mixed FPC and non-FPC scenario.

Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
@mbrandenburger mbrandenburger self-assigned this Nov 5, 2026
@mbrandenburger
mbrandenburger marked this pull request as ready for review November 5, 2026 16:54
@mbrandenburger
mbrandenburger requested a review from a team as a code owner November 5, 2026 16:54
@mbrandenburger
mbrandenburger merged commit 2f791ef into hyperledger:main Nov 5, 2026
23 checks passed
@mbrandenburger
mbrandenburger deleted the test/lifecycle-checks-in-echo branch November 5, 2026 17:54
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.

Remove duplicated lifecycle assertions from the integration suites

2 participants