Skip to content

Commit e4c925b

Browse files
Merge pull request #415 from IBM/Albert-Master-New
issue #414 enhance server integration tests to support both derby and db2
2 parents 94c4a0a + e60dc30 commit e4c925b

4 files changed

Lines changed: 442 additions & 261 deletions

File tree

fhir-server-test/src/test/java/com/ibm/fhir/server/test/R4ExampleServerTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616
* Basic sniff test of the FHIR Server.
1717
*/
1818
public class R4ExampleServerTest extends FHIRServerTestBase {
19-
19+
2020
/**
2121
* Process all the examples in the fhir-r4-spec example library
2222
*/
2323
@Test(groups = { "server-examples" })
2424
public void processExamples() throws Exception {
2525
DriverMetrics dm = new DriverMetrics();
26-
26+
2727
// Process each of the examples using the provided ExampleRequestProcessor. We want to
2828
// validate first before we try and send to FHIR
2929
final R4ExamplesDriver driver = new R4ExamplesDriver();
3030
driver.setMetrics(dm);
3131
driver.setValidator(new ValidationProcessor());
32-
driver.setProcessor(new ExampleRequestProcessor(this, null, dm, 1));
33-
32+
driver.setProcessor(new ExampleRequestProcessor(this, "default", dm, 1));
33+
3434
driver.processAllExamples();
35-
}
35+
}
3636
}

fhir-server-test/src/test/java/com/ibm/fhir/server/test/SearchExtensionsTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,20 @@ public void testCreatePatientWithExtensions() throws Exception {
5656

5757
Entity<Patient> entity = Entity.entity(patient, FHIRMediaType.APPLICATION_FHIR_JSON);
5858
Response response =
59-
target.path("Patient").request().header("X-FHIR-TENANT-ID", "tenant1").post(entity, Response.class);
59+
target.path("Patient").request()
60+
.header("X-FHIR-TENANT-ID", "tenant1")
61+
.post(entity, Response.class);
6062
assertResponse(response, Response.Status.CREATED.getStatusCode());
6163

6264
// Get the patient's logical id value.
6365
String patientId = getLocationLogicalId(response);
6466

6567
// Next, call the 'read' API to retrieve the new patient and verify it.
6668
response =
67-
target.path("Patient/" + patientId).request(FHIRMediaType.APPLICATION_FHIR_JSON).get();
69+
target.path("Patient/" + patientId)
70+
.request(FHIRMediaType.APPLICATION_FHIR_JSON)
71+
.header("X-FHIR-TENANT-ID", "tenant1")
72+
.get();
6873
assertResponse(response, Response.Status.OK.getStatusCode());
6974
Patient responsePatient = response.readEntity(Patient.class);
7075
savedCreatedPatientWithExtensions = responsePatient;

0 commit comments

Comments
 (0)