Merge "Add declarative acceptance tests"
authorDan Timoney <dtimoney@att.com>
Fri, 9 Aug 2019 21:49:29 +0000 (21:49 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 9 Aug 2019 21:49:29 +0000 (21:49 +0000)
1  2 
components/parent/pom.xml
ms/blueprintsprocessor/parent/pom.xml
ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
ms/controllerblueprints/parent/pom.xml

Simple merge
Simple merge
@@@ -39,17 -49,14 +49,17 @@@ class BluePrintArchiveUtils 
           *
           * @param source the base directory
           * @param destination the output filename
-          * @param absolute store absolute filepath (from directory) or only filename
           * @return True if OK
           */
-         fun compress(source: File, destination: File, absolute: Boolean): Boolean {
+         fun compress(source: File, destination: File): Boolean {
              try {
 +                if(!destination.parentFile.exists()) {
 +                    destination.parentFile.mkdirs()
 +                }
                  destination.createNewFile()
-                 ZipArchiveOutputStream(destination).use {
-                     recurseFiles(source, source, it, absolute)
+                 val ignoreZipFiles = Predicate<Path> { path -> !path.endsWith(".zip") && !path.endsWith(".ZIP") }
+                 FileOutputStream(destination).use { out ->
+                     compressFolder(source.toPath(), out, pathFilter = ignoreZipFiles)
                  }
              } catch (e: Exception) {
                  log.error("Fail to compress folder($source) to path(${destination.path})", e)