Skip to content

Commit

Permalink
update examples and integration tests for new endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
JonahFarc committed Mar 5, 2024
1 parent 1356f76 commit 815053e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,11 @@ public void testListAvailableServicerefTargetsInvalidType() throws Exception {
}
}

@Test(groups = "serviceRef", dependsOnMethods = "replaceZone")
@Test(groups = "serviceRef", dependsOnGroups = "replaceZone")
public void testGetServicerefTarget() throws Exception {
try {
GetServicerefTargetOptions getServicerefTargetOptions = new GetServicerefTargetOptions.Builder()
.serviceName(testServiceName)
.serviceName("containers-kubernetes")
.xCorrelationId("testString")
.transactionId("testString")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,19 @@ public static void main(String[] args) throws Exception {

try {
System.out.println("getServicerefTarget() result:");
String tempServiceName = serviceName;
serviceName = "containers-kubernetes";
// begin-get_serviceref_target
GetServicerefTargetOptions getServicerefTargetOptions = new GetServicerefTargetOptions.Builder()
.serviceName("testString")
.serviceName(serviceName)
.build();

Response<ServiceRefTarget> response = contextBasedRestrictionsService.getServicerefTarget(getServicerefTargetOptions).execute();
ServiceRefTarget serviceRefTarget = response.getResult();

System.out.println(serviceRefTarget);
// end-get_serviceref_target
serviceName = tempServiceName;
} catch (ServiceResponseException e) {
logger.error(String.format("Service returned status code %s: %s%nError details: %s",
e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()), e);
Expand Down

0 comments on commit 815053e

Please sign in to comment.