hedera-sdk-java icon indicating copy to clipboard operation
hedera-sdk-java copied to clipboard

Integration tests for `SystemDeleteTransaction`

Open deyanzz opened this issue 2 years ago • 3 comments

Problem

Seems that SystemDeleteTransaction is missing some integration tests.

Found during PR #477.

Solution

To add new integration test suite named SystemDeleteTransactionIntegrationTest:

  • deleteFile
  • deleteContract

For reference see SystemDeleteTransactionIntegrationTests.cc from the C++ SDK.

Alternatives

No response

deyanzz avatar Aug 30 '23 20:08 deyanzz

@deyanzz can you please check this file?

I tried to implement a separate test for deleteFile, and it throws a pre-check with the status NOT_SUPPORTED.

thenswan avatar Sep 06 '23 14:09 thenswan

As far as I can see, in SystemIntegrationTest.java in allSystemTransactionsAreNotSupported(), after creating FileCreateTransaction(), the setup for keys is missing - check line 26.

I ran several times the C++ implementation of SystemDeleteTransactionIntegrationTests.cc and it passed successfully every time on Testnet.

Maybe the setup of FileCreateTransaction is incorrect. We should try to create the operatorKey from ED25519PrivateKey using string 302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137 and then configure the newly created FileCreateTransaction.

deyanzz avatar Sep 11 '23 14:09 deyanzz

Double-checked and had the same result.

thenswan avatar Sep 11 '23 14:09 thenswan