@@ -434,10 +434,10 @@ func TestUnitNodeCreateTransactionGossipEndpointsValidation(t *testing.T) {
434434 tx .AddGossipEndpoint (endpoint )
435435 }
436436
437- _ , err := tx .Freeze ()
437+ tx , err := tx .Freeze ()
438438
439- require .Error (t , err )
440- assert .ErrorIs (t , err , errTooManyGossipEndpoints )
439+ require .NoError (t , err )
440+ assert .ErrorIs (t , tx . freezeError , errTooManyGossipEndpoints )
441441 })
442442
443443 t .Run ("GossipEndpointWithNoAddressOrDomainName" , func (t * testing.T ) {
@@ -449,10 +449,10 @@ func TestUnitNodeCreateTransactionGossipEndpointsValidation(t *testing.T) {
449449 invalidEndpoint := Endpoint {}
450450 tx .AddGossipEndpoint (invalidEndpoint )
451451
452- _ , err := tx .Freeze ()
452+ tx , err := tx .Freeze ()
453453
454- require .Error (t , err )
455- assert .ErrorIs (t , err , errEndpointMustHaveAddressOrDomainName )
454+ require .NoError (t , err )
455+ assert .ErrorIs (t , tx . freezeError , errEndpointMustHaveAddressOrDomainName )
456456 })
457457
458458 t .Run ("GossipEndpointWithBothAddressOrDomainName" , func (t * testing.T ) {
@@ -466,10 +466,10 @@ func TestUnitNodeCreateTransactionGossipEndpointsValidation(t *testing.T) {
466466 invalidEndpoint .SetDomainName ("example.com" )
467467 tx .AddGossipEndpoint (invalidEndpoint )
468468
469- _ , err := tx .Freeze ()
469+ tx , err := tx .Freeze ()
470470
471- require .Error (t , err )
472- assert .ErrorIs (t , err , errEndpointCannotHaveBothAddressAndDomainName )
471+ require .NoError (t , err )
472+ assert .ErrorIs (t , tx . freezeError , errEndpointCannotHaveBothAddressAndDomainName )
473473 })
474474
475475 t .Run ("ValidGossipEndpoints" , func (t * testing.T ) {
@@ -510,10 +510,10 @@ func TestUnitNodeCreateTransactionServiceEndpointsValidation(t *testing.T) {
510510 tx .AddServiceEndpoint (endpoint )
511511 }
512512
513- _ , err := tx .Freeze ()
513+ tx , err := tx .Freeze ()
514514
515- require .Error (t , err )
516- assert .ErrorIs (t , err , errTooManyServiceEndpoints )
515+ require .NoError (t , err )
516+ assert .ErrorIs (t , tx . freezeError , errTooManyServiceEndpoints )
517517 })
518518
519519 t .Run ("ServiceEndpointWithNoAddressOrDomainName" , func (t * testing.T ) {
@@ -525,10 +525,10 @@ func TestUnitNodeCreateTransactionServiceEndpointsValidation(t *testing.T) {
525525 invalidEndpoint := Endpoint {}
526526 tx .AddServiceEndpoint (invalidEndpoint )
527527
528- _ , err := tx .Freeze ()
528+ tx , err := tx .Freeze ()
529529
530- require .Error (t , err )
531- assert .ErrorIs (t , err , errEndpointMustHaveAddressOrDomainName )
530+ require .NoError (t , err )
531+ assert .ErrorIs (t , tx . freezeError , errEndpointMustHaveAddressOrDomainName )
532532 })
533533
534534 t .Run ("ServiceEndpointWithBothAddressOrDomainName" , func (t * testing.T ) {
@@ -542,10 +542,10 @@ func TestUnitNodeCreateTransactionServiceEndpointsValidation(t *testing.T) {
542542 invalidEndpoint .SetDomainName ("example.com" )
543543 tx .AddServiceEndpoint (invalidEndpoint )
544544
545- _ , err := tx .Freeze ()
545+ tx , err := tx .Freeze ()
546546
547- require .Error (t , err )
548- assert .ErrorIs (t , err , errEndpointCannotHaveBothAddressAndDomainName )
547+ require .NoError (t , err )
548+ assert .ErrorIs (t , tx . freezeError , errEndpointCannotHaveBothAddressAndDomainName )
549549 })
550550
551551 t .Run ("ValidServiceEndpoints" , func (t * testing.T ) {
@@ -584,10 +584,10 @@ func TestUnitNodeCreateTransactionGrpcWebProxyEndpointValidation(t *testing.T) {
584584 // No address or domain name set, making it invalid
585585 tx .SetGrpcWebProxyEndpoint (invalidEndpoint )
586586
587- _ , err := tx .Freeze ()
587+ tx , err := tx .Freeze ()
588588
589- require .Error (t , err )
590- assert .ErrorIs (t , err , errEndpointMustHaveAddressOrDomainName )
589+ require .NoError (t , err )
590+ assert .ErrorIs (t , tx . freezeError , errEndpointMustHaveAddressOrDomainName )
591591 })
592592
593593 t .Run ("GrpcWebProxyEndpointWithBothAddressOrDomainName" , func (t * testing.T ) {
@@ -600,9 +600,9 @@ func TestUnitNodeCreateTransactionGrpcWebProxyEndpointValidation(t *testing.T) {
600600 invalidEndpoint .SetAddress ([]byte {192 , 168 , 1 , 1 })
601601 invalidEndpoint .SetDomainName ("example.com" )
602602 tx .SetGrpcWebProxyEndpoint (invalidEndpoint )
603- _ , err := tx .Freeze ()
604- require .Error (t , err )
605- assert .ErrorIs (t , err , errEndpointCannotHaveBothAddressAndDomainName )
603+ tx , err := tx .Freeze ()
604+ require .NoError (t , err )
605+ assert .ErrorIs (t , tx . freezeError , errEndpointCannotHaveBothAddressAndDomainName )
606606 })
607607
608608 t .Run ("ValidGrpcWebProxyEndpoint" , func (t * testing.T ) {
@@ -650,10 +650,10 @@ func TestUnitNodeCreateTransactionGossipCaCertificateValidation(t *testing.T) {
650650 // Set an empty gossip CA certificate
651651 tx .SetGossipCaCertificate ([]byte {})
652652
653- _ , err := tx .Freeze ()
653+ tx , err := tx .Freeze ()
654654
655- require .Error (t , err )
656- assert .ErrorIs (t , err , errGossipCaCertificateEmpty )
655+ require .NoError (t , err )
656+ assert .ErrorIs (t , tx . freezeError , errGossipCaCertificateEmpty )
657657 })
658658
659659 t .Run ("ValidGossipCaCertificate" , func (t * testing.T ) {
@@ -697,10 +697,10 @@ func TestUnitNodeCreateTransactionDescriptionValidation(t *testing.T) {
697697 longDescription := strings .Repeat ("a" , 101 )
698698 tx .SetDescription (longDescription )
699699
700- _ , err := tx .Freeze ()
700+ tx , err := tx .Freeze ()
701701
702- require .Error (t , err )
703- assert .ErrorIs (t , err , errDescriptionTooLong )
702+ require .NoError (t , err )
703+ assert .ErrorIs (t , tx . freezeError , errDescriptionTooLong )
704704 })
705705
706706 t .Run ("DescriptionAtLimit" , func (t * testing.T ) {
0 commit comments