File tree Expand file tree Collapse file tree
tests/destination/integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -342,3 +342,7 @@ Feature: Destination Service Integration
342342 Then the destination creation should be successful
343343 When I get subaccount destination "test-dest-sub-isolation" with "PROVIDER_ONLY" access strategy
344344 Then the destination should not be found
345+
346+ Scenario : Get service instance ID returns a non-empty string
347+ When I call get_service_instance_id
348+ Then the service instance ID should be a non-empty string
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def __init__(self):
6161 self .retrieved_labels : List [Label ] = []
6262 self .http_client : Optional [DestinationHttpClient ] = None
6363 self .http_response = None
64+ self .service_instance_id : Optional [str ] = None
6465
6566
6667@pytest .fixture
@@ -1621,3 +1622,17 @@ def assert_authorization_header_present(context):
16211622 f"Expected Authorization header in response, got: { list (echoed .keys ())} . "
16221623 "Check that BTP returned an auth token for the destination."
16231624 )
1625+
1626+
1627+ @when ("I call get_service_instance_id" )
1628+ def call_get_service_instance_id (context , destination_client ):
1629+ """Call get_service_instance_id and store the result."""
1630+ context .service_instance_id = destination_client .get_service_instance_id ()
1631+
1632+
1633+ @then ("the service instance ID should be a non-empty string" )
1634+ def assert_service_instance_id_non_empty (context ):
1635+ """Verify the service instance ID is a non-empty string."""
1636+ assert context .service_instance_id is not None
1637+ assert isinstance (context .service_instance_id , str )
1638+ assert context .service_instance_id .strip (), "Expected a non-empty service instance ID"
You can’t perform that action at this time.
0 commit comments