Skip to content

Commit

Permalink
SDK-360 - Add test for 2.1 refapp
Browse files Browse the repository at this point in the history
  • Loading branch information
mseaton committed Nov 22, 2024
1 parent 6573fd9 commit fab4406
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,30 @@ protected void addTestResources() throws Exception {
FileUtils.copyDirectoryToDirectory(sourcePath.toFile(), testDirectory);
}

@Test
public void build_shouldBuildRefapp_2_1_0() throws Exception {
executeTest(() -> {
DistributionBuilder builder = new DistributionBuilder(getMavenEnvironment());
Artifact artifact = new Artifact(SDKConstants.REFAPP_2X_ARTIFACT_ID, "2.1", SDKConstants.REFAPP_2X_GROUP_ID, SDKConstants.REFAPP_2X_TYPE);
Distribution distribution = builder.buildFromArtifact(artifact);
assertNotNull(distribution);
assertThat(distribution.getName(), equalTo("Reference Application"));
assertThat(distribution.getVersion(), equalTo("2.1"));
assertNull(distribution.getParent());
assertThat(distribution.getArtifact(), equalTo(artifact));
assertNull(distribution.getArtifactPath());
assertThat(distribution.getResourcePath(), equalTo("openmrs-distro-2.1.properties"));
assertNull(distribution.getFile());
DistroProperties distroProperties = distribution.getProperties();
Properties allProperties = distroProperties.getAllProperties();
Properties expected = getExpectedPropertiesFromResource(artifact);
assertThat(allProperties.size(), equalTo(expected.size()));
for (String p : expected.stringPropertyNames()) {
assertThat(allProperties.getProperty(p), equalTo(expected.getProperty(p)));
}
});
}

@Test
public void build_shouldBuildRefapp_2_13_0() throws Exception {
executeTest(() -> {
Expand Down Expand Up @@ -87,8 +111,4 @@ Properties getExpectedPropertiesFromResource(Artifact artifact) throws Exception
distroPath = distroPath.resolve(artifact.getArtifactId() + "-" + artifact.getVersion() + ".properties");
return PropertiesUtils.loadPropertiesFromFile(distroPath.toFile());
}




}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name=Reference Application
version=2.1
war.openmrs=1.10.0
omod.referencemetadata=2.1.1
omod.appframework=2.2.1
omod.uiframework=3.3.1
omod.registrationcore=1.0
omod.registrationapp=1.0
omod.idgen=2.9.1
omod.emrapi=1.4
omod.providermanagement=2.2
omod.uilibrary=2.0.4
omod.uicommons=1.3
omod.referenceapplication=2.1.1
omod.calculation=1.1
omod.reporting=0.9.2.1
omod.metadatadeploy=1.2
omod.metadatasharing=1.1.8
omod.metadatamapping=1.0.1
omod.serialization.xstream=0.2.7
omod.serialization.xstream.type=omod
omod.htmlwidgets=1.6.5
omod.htmlformentry=2.4
omod.htmlformentry19ext=1.4
omod.htmlformentryui=1.1
omod.appui=1.2.2
omod.event=2.1
omod.event.groupId=org.openmrs
omod.coreapps=1.4
omod.webservices.rest=2.6
omod.referencedemodata=1.3
omod.reportingrest=1.3
omod.namephonetics=1.4
omod.dataexchange=1.2
omod.allergyapi=1.0.1
omod.allergyui=1.0
omod.formentryapp=1.0
omod.atlas=2.1
omod.atlas.type=omod
db.h2.supported=false
war.openmrs.groupId=org.openmrs.web

0 comments on commit fab4406

Please sign in to comment.