summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2019-01-25 14:54:56 -0500
committerKAPIL SINGAL <ks220y@att.com>2019-01-28 19:49:33 +0000
commiteac0ff52589c4dd0c3f26a25991f89b5c8743ff9 (patch)
treee3e1d784347c232066d15f1b10a161af96b56025 /ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test
parentb20d517fb19e3552130effcf362d79b560578f2c (diff)
Controller Design Studio: Blueprint Manager
Blueprint Manager JUnit Test Case Enhacements Change-Id: I6d98436f13ee58450ba9459266ec657ca30a2d99 Issue-ID: CCSDK-1005 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandlerTest.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandlerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandlerTest.kt
index 4da3b7459..264e2aea6 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandlerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandlerTest.kt
@@ -19,7 +19,6 @@ package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
import com.google.protobuf.ByteString
import io.grpc.testing.GrpcServerRule
-import org.apache.commons.io.FileUtils
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -34,7 +33,6 @@ import org.springframework.test.annotation.DirtiesContext
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
import java.io.File
-import java.nio.file.Paths
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.assertEquals
@@ -59,12 +57,12 @@ class BluePrintManagementGRPCHandlerTest {
grpcServerRule.serviceRegistry.addService(bluePrintManagementGRPCHandler)
}
- //@AfterTest
+ @AfterTest
fun cleanDir() {
//TODO It's giving fluctuating results, need to look for another way to cleanup
// works sometimes otherwise results IO Exception
// Most probably bufferReader stream is not getting closed when cleanDir is getting invoked
- FileUtils.deleteDirectory(File("./target/blueprints"))
+ File("./target/blueprints").deleteRecursively()
}
@Test
@@ -95,7 +93,7 @@ class BluePrintManagementGRPCHandlerTest {
}
private fun createInputRequest(id: String): BluePrintManagementInput {
- val file = Paths.get("./src/test/resources/test-cba.zip").toFile()
+ val file = File("./src/test/resources/test-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
val commonHeader = CommonHeader