hedera-services icon indicating copy to clipboard operation
hedera-services copied to clipboard

feat: Write tests for freeze/unfreeze operations

Open stefan-stefanooov opened this issue 10 months ago • 8 comments

Description:

  • freezeToken
  • unfreezeToken
Suite Tests Signatures
FreezeUnfreezeTokenPrecompileV1SecurityModelSuite freezeUnfreezeFungibleWithNegativeCases() freezeUnfreezeNftsWithNegativeCases() isFrozenHappyPathWithLocalCall() - transaction payer- contract Id- freeze key

Related issue(s): https://github.com/hashgraph/hedera-services/issues/12723 Fixes # https://github.com/hashgraph/hedera-services/issues/12723

stefan-stefanooov avatar Apr 26 '24 12:04 stefan-stefanooov

Node: HAPI Test (Restart) Results

2 tests   2 :white_check_mark:  7m 47s :stopwatch: 2 suites  0 :zzz: 2 files    0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 09:05 github-actions[bot]

Node: HAPI Test (Node Death Reconnect) Results

2 tests   2 :white_check_mark:  6m 42s :stopwatch: 2 suites  0 :zzz: 2 files    0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 09:05 github-actions[bot]

Node: HAPI Test (Token) Results

 19 files   19 suites   5m 27s :stopwatch: 256 tests 256 :white_check_mark: 0 :zzz: 0 :x: 259 runs  259 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 09:05 github-actions[bot]

Node: HAPI Test (Misc) Results

 50 files   50 suites   22m 59s :stopwatch: 361 tests 361 :white_check_mark: 0 :zzz: 0 :x: 378 runs  378 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 09:05 github-actions[bot]

Node: HAPI Test (Crypto) Results

 22 files   22 suites   13m 23s :stopwatch: 349 tests 349 :white_check_mark: 0 :zzz: 0 :x: 355 runs  355 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 09:05 github-actions[bot]

Node: HAPI Test (Time Consuming) Results

18 tests   18 :white_check_mark:  22m 2s :stopwatch:  3 suites   0 :zzz:  3 files     0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 10:05 github-actions[bot]

Node: HAPI Test (Smart Contract) Results

 66 files   66 suites   22m 6s :stopwatch: 587 tests 587 :white_check_mark: 0 :zzz: 0 :x: 611 runs  611 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 7d89c22f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 10:05 github-actions[bot]

Node: Unit Test Results

  2 319 files  ±0    2 319 suites  ±0   3h 23m 22s :stopwatch: ±0s 119 050 tests ±0  118 983 :white_check_mark: ±0  67 :zzz: ±0  0 :x: ±0  127 609 runs  ±0  127 542 :white_check_mark: ±0  67 :zzz: ±0  0 :x: ±0 

Results for commit 7d89c22f. ± Comparison against base commit 3f322bda.

This pull request removes 357 and adds 121 tests. Note that renamed tests count towards both.

  
             IssuerDN: CN=s-aaaa
            SubjectDN: CN=s-aaaa
           Final Date: Fri Jan 01 00:00:00 UTC 2100
           Public Key: RSA Public Key [2e:28:bc:1e:d3:83:25:92:8e:cb:98:b1:b6:84:06:9c:d5:d8:14:d5],[56:66:d1:a4]
           Start Date: Sat Jan 01 00:00:00 UTC 2000
         SerialNumber: 12482092706667292405
        modulus: c1a0ff5d2372b53d12d12bb87dd03f5e…
        modulus: c1a0ff5d2372b53d12d12bb87dd03f5…
…
com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [4] 

com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [6] 

com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [7]   
  
com.hedera.node.app.state.merkle.StateMetadataTest ‑ [11] 

com.hedera.node.app.state.merkle.StateMetadataTest ‑ [203] Some Legal Characters 

com.hedera.node.app.state.merkle.StateMetadataTest ‑ [395] 
 Some Legal Characters
com.swirlds.platform.crypto.KeysAndCertsTest ‑ [1] AddressBook {
   Address[id=0,nickname=hue0xm2W,selfName=aaaa,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=53161,hostnameExternal=64.56.155.89,portExternalIpv4=53161,sigPublicKey=<null>,agreePublicKey=<null>,sigCert=com.swirlds.platform.crypto.SerializableX509Certificate@1ec5c8df,agreeCert=com.swirlds.platform.crypto.SerializableX509Certificate@698b32d5,memo=iICStbZJ],
   Address[id=3,nickname=BK7yGXwA,selfName=aaab,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=41016,hostnameExternal=1…, {0=KeysAndCerts[sigKeyPair=java.security.KeyPair@2aa19591, agrKeyPair=java.security.KeyPair@3b9c1452, sigCert=[
[
  Version: V3
  Subject: CN=s-aaaa
  Signature Algorithm: SHA384withRSA, OID = 1.2.840.113549.1.1.12

  Key:  Sun RSA public key, 3072 bits
  params: null
  modulus: 399359783971008386823194517591913909076180800663617430152293322362851354916562240539217992749052543798926670565779538052222399243364172487884744393106571360720093667481704909500324706084082081682560810453972293976421988390921489916…
com.swirlds.platform.crypto.KeysAndCertsTest ‑ [2] AddressBook {
   Address[id=0,nickname=3VoAbNtE,selfName=aaaa,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=63746,hostnameExternal=43.142.203.57,portExternalIpv4=63746,sigPublicKey=<null>,agreePublicKey=<null>,sigCert=com.swirlds.platform.crypto.SerializableX509Certificate@622bdfdc,agreeCert=com.swirlds.platform.crypto.SerializableX509Certificate@996ed93,memo=dlaQFyZc],
   Address[id=1,nickname=tKTv80jn,selfName=aaab,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=44960,hostnameExternal=2…, {0=KeysAndCerts[sigKeyPair=java.security.KeyPair@6ee7da38, agrKeyPair=java.security.KeyPair@4954874, sigCert=  [0]         Version: 3
         SerialNumber: 12482092706667292405
             IssuerDN: CN=s-aaaa
           Start Date: Sat Jan 01 00:00:00 UTC 2000
           Final Date: Fri Jan 01 00:00:00 UTC 2100
            SubjectDN: CN=s-aaaa
           Public Key: RSA Public Key [2e:28:bc:1e:d3:83:25:92:8e:cb:98:b1:b6:84:06:9c:d5:d8:14:d5],[56:66:d1:a4]
        modulus: c1a0ff5d2372b53d12d12bb87dd03f5e…
com.swirlds.platform.network.connectivity.InboundConnectionHandlerTest ‑ [1] AddressBook {
   Address[id=0,nickname=g4Q0ZE9j,selfName=aaaa,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=57842,hostnameExternal=20.66.65.186,portExternalIpv4=57842,sigPublicKey=<null>,agreePublicKey=<null>,sigCert=com.swirlds.platform.crypto.SerializableX509Certificate@214e45ea,agreeCert=com.swirlds.platform.crypto.SerializableX509Certificate@6a786c1b,memo=c0IjQxpS],
   Address[id=1,nickname=dUXc0p6O,selfName=aaab,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=31775,hostnameExternal=7…, {0=KeysAndCerts[sigKeyPair=java.security.KeyPair@63fe4785, agrKeyPair=java.security.KeyPair@5a3100b2, sigCert=[
[
  Version: V3
  Subject: CN=s-aaaa
  Signature Algorithm: SHA384withRSA, OID = 1.2.840.113549.1.1.12

  Key:  Sun RSA public key, 3072 bits
  params: null
  modulus: 399359783971008386823194517591913909076180800663617430152293322362851354916562240539217992749052543798926670565779538052222399243364172487884744393106571360720093667481704909500324706084082081682560810453972293976421988390921489916…
com.swirlds.platform.network.connectivity.InboundConnectionHandlerTest ‑ [1] AddressBook {
   Address[id=0,nickname=vIiM0YbG,selfName=aaaa,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=15365,hostnameExternal=180.112.74.59,portExternalIpv4=15365,sigPublicKey=<null>,agreePublicKey=<null>,sigCert=com.swirlds.platform.crypto.SerializableX509Certificate@2d7d502,agreeCert=com.swirlds.platform.crypto.SerializableX509Certificate@97e7c6b,memo=8sCuYm1Q],
   Address[id=2,nickname=cxwUFIWY,selfName=aaab,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=55271,hostnameExternal=62…, {0=KeysAndCerts[sigKeyPair=java.security.KeyPair@5c349df6, agrKeyPair=java.security.KeyPair@3bb3ee25, sigCert=[
[
  Version: V3
  Subject: CN=s-aaaa
  Signature Algorithm: SHA384withRSA, OID = 1.2.840.113549.1.1.12

  Key:  Sun RSA public key, 3072 bits
  params: null
  modulus: 399359783971008386823194517591913909076180800663617430152293322362851354916562240539217992749052543798926670565779538052222399243364172487884744393106571360720093667481704909500324706084082081682560810453972293976421988390921489916…
…

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 02 '24 10:05 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.21%. Comparing base (3f322bd) to head (2c159a0).

:exclamation: Current head 2c159a0 differs from pull request most recent head 7d89c22

Please upload reports for the commit 7d89c22 to get more accurate results.

Additional details and impacted files
@@              Coverage Diff               @@
##             develop   #13016       +/-   ##
==============================================
+ Coverage           0   67.21%   +67.21%     
- Complexity         0    36155    +36155     
==============================================
  Files              0     3700     +3700     
  Lines              0   148951   +148951     
  Branches           0    15501    +15501     
==============================================
+ Hits               0   100115   +100115     
- Misses             0    44507    +44507     
- Partials           0     4329     +4329     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 15 '24 11:05 codecov[bot]

LG overall. A few comments that you can address or not at your discretion.

The new version is ready for a review @lukelee-sl. Thank you

stefan-stefanooov avatar May 17 '24 09:05 stefan-stefanooov