@@ -215,38 +215,12 @@ public void createDomain_with_invalidManagedServerPort_failsAndReturnsError() th
215215 failsAndPrints (invalidIntegerParamValueError (PARAM_MANAGED_SERVER_PORT , val )));
216216 }
217217
218- @ Test
219- public void createDomain_with_invalidWeblogicDomainStorageReclaimPolicy_failsAndReturnsError () throws Exception {
220- String val = "invalid-storage-reclaim-policy" ;
221- assertThat (
222- execCreateDomain (newInputs ().weblogicDomainStorageReclaimPolicy (val )),
223- failsAndPrints (invalidEnumParamValueError (PARAM_WEBLOGIC_DOMAIN_STORAGE_RECLAIM_POLICY , val )));
224- }
225-
226- @ Test
227- public void createDomain_with_weblogicDomainStorageReclaimPolicyDeleteAndNonTmoWeblogicDomainStoragePath_failsAndReturnsError () throws Exception {
228- assertThat (
229- execCreateDomain (newInputs ().weblogicDomainStorageReclaimPolicy (STORAGE_RECLAIM_POLICY_DELETE ).weblogicDomainStoragePath ("/scratch" )),
230- failsAndPrints (invalidRelatedParamValueError (PARAM_WEBLOGIC_DOMAIN_STORAGE_RECLAIM_POLICY , STORAGE_RECLAIM_POLICY_DELETE ,
231- PARAM_WEBLOGIC_DOMAIN_STORAGE_PATH , "/scratch" )));
232- }
233-
234- @ Test
235- public void createDomain_with_weblogicDomainStorageReclaimPolicyDelete_and_tmpWeblogicDomainStoragePath_succeeds () throws Exception {
236- GeneratedDomainYamlFiles
237- .generateDomainYamlFiles (
238- newInputs ()
239- .weblogicDomainStorageReclaimPolicy (STORAGE_RECLAIM_POLICY_DELETE )
240- .weblogicDomainStoragePath ("/tmp/" ))
241- .remove ();
242- }
243-
244218 @ Test
245219 public void createDomain_with_weblogicDomainStorageTypeNfsAndMissingWeblogicDomainStorageNFSServer_failsAndReturnsError () throws Exception {
246220 assertThat (
247221 execCreateDomain (newInputs ().weblogicDomainStorageType (STORAGE_TYPE_NFS ).weblogicDomainStorageNFSServer ("" )),
248222 failsAndPrints (paramMissingError (PARAM_WEBLOGIC_DOMAIN_STORAGE_NFS_SERVER )));
249- }
223+ }
250224
251225 @ Test
252226 public void createDomain_with_invalidWeblogicDomainStorageType_failsAndReturnsError () throws Exception {
@@ -273,6 +247,32 @@ public void createDomain_with_missingWeblogicDomainStoragePath_failsAndReturnsEr
273247 failsAndPrints (paramMissingError (PARAM_WEBLOGIC_DOMAIN_STORAGE_PATH )));
274248 }
275249
250+ @ Test
251+ public void createDomain_with_invalidWeblogicDomainStorageReclaimPolicy_failsAndReturnsError () throws Exception {
252+ String val = "invalid-storage-reclaim-policy" ;
253+ assertThat (
254+ execCreateDomain (newInputs ().weblogicDomainStorageReclaimPolicy (val )),
255+ failsAndPrints (invalidEnumParamValueError (PARAM_WEBLOGIC_DOMAIN_STORAGE_RECLAIM_POLICY , val )));
256+ }
257+
258+ @ Test
259+ public void createDomain_with_weblogicDomainStorageReclaimPolicyDeleteAndNonTmoWeblogicDomainStoragePath_failsAndReturnsError () throws Exception {
260+ assertThat (
261+ execCreateDomain (newInputs ().weblogicDomainStorageReclaimPolicy (STORAGE_RECLAIM_POLICY_DELETE ).weblogicDomainStoragePath ("/scratch" )),
262+ failsAndPrints (invalidRelatedParamValueError (PARAM_WEBLOGIC_DOMAIN_STORAGE_RECLAIM_POLICY , STORAGE_RECLAIM_POLICY_DELETE ,
263+ PARAM_WEBLOGIC_DOMAIN_STORAGE_PATH , "/scratch" )));
264+ }
265+
266+ @ Test
267+ public void createDomain_with_weblogicDomainStorageReclaimPolicyDelete_and_tmpWeblogicDomainStoragePath_succeeds () throws Exception {
268+ GeneratedDomainYamlFiles
269+ .generateDomainYamlFiles (
270+ newInputs ()
271+ .weblogicDomainStorageReclaimPolicy (STORAGE_RECLAIM_POLICY_DELETE )
272+ .weblogicDomainStoragePath ("/tmp/" ))
273+ .remove ();
274+ }
275+
276276 @ Test
277277 public void createDomain_with_missingWeblogicDomainStorageSize_failsAndReturnsError () throws Exception {
278278 assertThat (
0 commit comments