42
42
import static com .hederahashgraph .api .proto .java .ResponseCodeEnum .UNAUTHORIZED ;
43
43
import static org .junit .jupiter .api .Assertions .assertEquals ;
44
44
import static org .junit .jupiter .api .Assertions .assertNotNull ;
45
- import static org .junit .jupiter .api .Assertions .assertNull ;
46
45
47
46
import com .google .protobuf .ByteString ;
48
47
import com .hedera .services .bdd .junit .EmbeddedHapiTest ;
@@ -286,17 +285,14 @@ final Stream<DynamicTest> failOnTooManyServiceEndpoints() throws CertificateEnco
286
285
* Check that node creation succeeds with gossip and service endpoints using ips and all optional fields are recorded.
287
286
* @see <a href="https://github.com/hashgraph/hedera-improvement-proposal/blob/main/HIP/hip-869.md#specification">HIP-869</a>
288
287
*/
289
- @ LeakyEmbeddedHapiTest (
290
- reason = NEEDS_STATE_ACCESS ,
291
- overrides = {"nodes.webProxyEndpointsEnabled" })
288
+ @ EmbeddedHapiTest (NEEDS_STATE_ACCESS )
292
289
final Stream <DynamicTest > allFieldsSetHappyCaseForIps () throws CertificateEncodingException {
293
290
final var nodeCreate = canonicalNodeCreate ()
294
291
.gossipEndpoint (GOSSIP_ENDPOINTS_IPS )
295
292
.serviceEndpoint (SERVICES_ENDPOINTS_IPS )
296
293
// The web proxy endpoint can never be an IP address
297
294
.grpcWebProxyEndpoint (GRPC_PROXY_ENDPOINT_FQDN );
298
295
return hapiTest (
299
- overriding ("nodes.webProxyEndpointsEnabled" , "true" ),
300
296
newKeyNamed (ED_25519_KEY ).shape (KeyShape .ED25519 ),
301
297
nodeCreate ,
302
298
verifyCanonicalCreate (nodeCreate ),
@@ -313,36 +309,18 @@ final Stream<DynamicTest> allFieldsSetHappyCaseForIps() throws CertificateEncodi
313
309
*/
314
310
@ LeakyEmbeddedHapiTest (
315
311
reason = NEEDS_STATE_ACCESS ,
316
- overrides = {"nodes.gossipFqdnRestricted" , "nodes.webProxyEndpointsEnabled" })
312
+ overrides = {"nodes.gossipFqdnRestricted" })
317
313
final Stream <DynamicTest > allFieldsSetHappyCaseForDomains () throws CertificateEncodingException {
318
314
final var nodeCreate = canonicalNodeCreate ();
319
- return hapiTest (
320
- overridingTwo ("nodes.gossipFqdnRestricted" , "false" , "nodes.webProxyEndpointsEnabled" , "true" ),
321
- newKeyNamed (ED_25519_KEY ).shape (KeyShape .ED25519 ),
322
- nodeCreate ,
323
- verifyCanonicalCreate (nodeCreate ),
324
- viewNode ("nodeCreate" , node -> {
325
- assertEqualServiceEndpoints (GOSSIP_ENDPOINTS_FQDNS , node .gossipEndpoint ());
326
- assertEqualServiceEndpoints (SERVICES_ENDPOINTS_FQDNS , node .serviceEndpoint ());
327
- assertEqualServiceEndpoint (GRPC_PROXY_ENDPOINT_FQDN , node .grpcProxyEndpoint ());
328
- }));
329
- }
330
-
331
- @ LeakyEmbeddedHapiTest (
332
- reason = NEEDS_STATE_ACCESS ,
333
- overrides = {"nodes.gossipFqdnRestricted" })
334
- final Stream <DynamicTest > allFieldsButProxyEndpointSet () throws CertificateEncodingException {
335
- final var nodeCreate = canonicalNodeCreate ().withNoWebProxyEndpoint ();
336
315
return hapiTest (
337
316
overriding ("nodes.gossipFqdnRestricted" , "false" ),
338
317
newKeyNamed (ED_25519_KEY ).shape (KeyShape .ED25519 ),
339
318
nodeCreate ,
340
319
verifyCanonicalCreate (nodeCreate ),
341
- // nodes.webProxyEndpointsEnabled should default to false, resulting in a null proxy endpoint
342
320
viewNode ("nodeCreate" , node -> {
343
321
assertEqualServiceEndpoints (GOSSIP_ENDPOINTS_FQDNS , node .gossipEndpoint ());
344
322
assertEqualServiceEndpoints (SERVICES_ENDPOINTS_FQDNS , node .serviceEndpoint ());
345
- assertNull ( node .grpcProxyEndpoint ());
323
+ assertEqualServiceEndpoint ( GRPC_PROXY_ENDPOINT_FQDN , node .grpcProxyEndpoint ());
346
324
}));
347
325
}
348
326
@@ -355,10 +333,9 @@ final Stream<DynamicTest> webProxySetWhenNotEnabledReturnsNotSupported() throws
355
333
nodeCreate .hasKnownStatus (GRPC_WEB_PROXY_NOT_SUPPORTED ));
356
334
}
357
335
358
- @ LeakyHapiTest ( overrides = { "nodes.webProxyEndpointsEnabled" })
336
+ @ HapiTest
359
337
final Stream <DynamicTest > webProxyAsIpAddressIsRejected () throws CertificateEncodingException {
360
338
return hapiTest (
361
- overriding ("nodes.webProxyEndpointsEnabled" , "true" ),
362
339
newKeyNamed ("adminKey" ),
363
340
nodeCreate ("nodeCreate" )
364
341
.adminKey ("adminKey" )
@@ -624,10 +601,9 @@ final Stream<DynamicTest> createNodeFailsWithRegPayer() throws CertificateEncodi
624
601
.hasKnownStatus (UNAUTHORIZED ));
625
602
}
626
603
627
- @ LeakyHapiTest ( overrides = { "nodes.webProxyEndpointsEnabled" })
604
+ @ HapiTest
628
605
final Stream <DynamicTest > createNodeWithDefaultGrpcProxyFails () throws CertificateEncodingException {
629
606
return hapiTest (
630
- overriding ("nodes.webProxyEndpointsEnabled" , "true" ),
631
607
newKeyNamed ("adminKey" ),
632
608
nodeCreate ("testNode" )
633
609
.adminKey ("adminKey" )
0 commit comments