@@ -172,32 +172,32 @@ public void deploy_shouldUpgradeDistroWithConfigPackage() throws Exception {
172
172
173
173
@ Test
174
174
public void deploy_shouldUpgradeDistroWithContentPackage () throws Exception {
175
+ setupContentPackage ("testpackage2" );
175
176
testServerId = setupTestServer ("referenceapplication:2.2" );
176
177
includeDistroPropertiesFile ("openmrs-distro-content-package.properties" );
177
178
addAnswer (testServerId );
178
179
addAnswer ("y" );
179
180
addAnswer ("y" );
180
181
executeTask ("deploy" );
181
182
assertSuccess ();
182
- assertFilePresent (testServerId , "configuration" , "conceptclasses" , "hiv" , "conceptclasses.csv" );
183
- assertFilePresent (testServerId , "configuration" , "conceptsources" , "hiv" , "conceptsources.csv" );
184
- assertFilePresent (testServerId , "configuration" , "encountertypes" , "hiv" , "encountertypes.csv" );
185
- assertLogContains ("+ Adds content package hiv 1.0.0" );
183
+ assertFilePresent (testServerId , "configuration" , "globalproperties" , "testpackage2" , "gp.xml" );
184
+ assertFilePresent (testServerId , "configuration" , "patientidentifiertypes" , "testpackage2" , "patientidentifiertypes.csv" );
185
+ assertLogContains ("+ Adds content package testpackage2 1.0.0" );
186
186
}
187
187
188
188
@ Test
189
189
public void deploy_shouldUpgradeDistroWithContentPackageWithoutNamespace () throws Exception {
190
+ setupContentPackage ("testpackage2" );
190
191
testServerId = setupTestServer ("referenceapplication:2.2" );
191
192
includeDistroPropertiesFile ("openmrs-distro-content-package-no-namespace.properties" );
192
193
addAnswer (testServerId );
193
194
addAnswer ("y" );
194
195
addAnswer ("y" );
195
196
executeTask ("deploy" );
196
197
assertSuccess ();
197
- assertFilePresent (testServerId , "configuration" , "conceptclasses" , "conceptclasses.csv" );
198
- assertFilePresent (testServerId , "configuration" , "conceptsources" , "conceptsources.csv" );
199
- assertFilePresent (testServerId , "configuration" , "encountertypes" , "encountertypes.csv" );
200
- assertLogContains ("+ Adds content package hiv 1.0.0" );
198
+ assertFilePresent (testServerId , "configuration" , "globalproperties" , "gp.xml" );
199
+ assertFilePresent (testServerId , "configuration" , "patientidentifiertypes" , "patientidentifiertypes.csv" );
200
+ assertLogContains ("+ Adds content package testpackage2 1.0.0" );
201
201
}
202
202
203
203
@ Test
@@ -232,17 +232,17 @@ public void deploy_shouldReplaceConfigurationAndContentIfChanged() throws Except
232
232
assertFileNotPresent (testServerId , "configuration" , "addresshierarchy" , "addresshierarchy-core_demo.csv" );
233
233
assertFileNotPresent (testServerId , "configuration" , "conceptclasses" , "conceptclasses-core_data.csv" );
234
234
assertFileNotPresent (testServerId , "configuration" , "encountertypes" , "encountertypes_core-demo.csv" );
235
- assertFilePresent (testServerId , "configuration" , "conceptclasses " , "hiv " , "conceptclasses.csv " );
236
- assertFilePresent (testServerId , "configuration" , "conceptsources " , "hiv " , "conceptsources .csv" );
237
- assertFilePresent ( testServerId , "configuration" , "encountertypes" , "hiv" , "encountertypes.csv" );
235
+ assertFilePresent (testServerId , "configuration" , "globalproperties " , "testpackage2 " , "gp.xml " );
236
+ assertFilePresent (testServerId , "configuration" , "patientidentifiertypes " , "testpackage2 " , "patientidentifiertypes .csv" );
237
+
238
238
assertLogContains ("- Removes existing configuration" );
239
- assertLogContains ("+ Adds content package hiv 1.0.0" );
239
+ assertLogContains ("+ Adds content package testpackage2 1.0.0" );
240
240
241
241
server = Server .loadServer (testDirectoryPath .resolve (testServerId ));
242
242
assertNotNull (server );
243
243
assertThat (server .getConfigArtifacts ().size (), equalTo (0 ));
244
244
assertThat (server .getContentPackages ().size (), equalTo (1 ));
245
- assertThat (server .getContentPackages ().get (0 ).getArtifactId (), equalTo ("hiv " ));
245
+ assertThat (server .getContentPackages ().get (0 ).getArtifactId (), equalTo ("testpackage2 " ));
246
246
}
247
247
248
248
@ Test
0 commit comments