Deleting target directory before BP enhance test
authorottero <rodrigo.ottero@est.tech>
Wed, 20 Mar 2019 09:43:55 +0000 (09:43 +0000)
committerottero <rodrigo.ottero@est.tech>
Wed, 20 Mar 2019 09:43:55 +0000 (09:43 +0000)
commit893997eb196036182cc9691fc4ed23d94cef353f
tree99888ec3029d0708807f5e24a91bae8e0869e4f1
parent9a8f0f7e8335915eaa844ce71a8ab2627eb37bab
Deleting target directory before BP enhance test

The enhancement process reads a blueprint entry definition and creates
the files describing the types used by it.

At the end of the enhancement process, the blueprint files are copied
to a directory. However, if it is not the first time the test is being
run, the previous files won't be deleted beforehand.

This does not represent a problem in case the blueprint has not added
any extra file, but in the cases where a script is deleted, renamed or
moved, the enhancement won't remove the old file.

For test purposes, this is not a problem, but since the enhancement te-
st is also used by developers to enhance their blueprints during deve-
lopment, a small cleaning routine was added to remove the enhancement
target directory before the operation starts, to avoid mistakes where a
old version of a script is still being zipped as part of the blueprint

Change-Id: I971f29f146b75d566a35cda0cb7a32a9a24be58e
Issue-ID: CCSDK-926
Signed-off-by: ottero <rodrigo.ottero@est.tech>
ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt