From 684e8ce9dbaf9fd1658f41ba566db8e8a04d05eb Mon Sep 17 00:00:00 2001 From: IBA-mainframe-dev Date: Fri, 17 May 2024 11:32:38 +0200 Subject: [PATCH] Two tests fixed --- .../zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt | 3 ++- .../org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt b/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt index 65517ac..6ea4b19 100644 --- a/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt +++ b/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt @@ -49,6 +49,7 @@ class WriteFileToDatasetStepSpec : ShouldSpec({ val zosConnection = ZOSConnection(mockServer.hostName, mockServer.port.toString(), "test", "test", "https") val rootDir = Paths.get("").toAbsolutePath().toString() val trashDir = tempdir() + val mockDir = Paths.get(rootDir, "src", "test", "resources", "mock").toString() val itemGroup = object : TestItemGroup() { override fun getRootDirFor(child: Item?): File { return trashDir @@ -97,7 +98,7 @@ class WriteFileToDatasetStepSpec : ShouldSpec({ val writeFileToDatasetDecl = spyk( WriteFileToDatasetStep("test", "TEST.IJMP.DATASET1", "workspace") ) - writeFileToDatasetDecl.setWorkspacePath("test_file.txt") + writeFileToDatasetDecl.setLocalFilePath(mockDir + "/test_file.txt") writeFileToDatasetDecl.perform( build, launcher, diff --git a/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt b/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt index 18e3843..4a5433d 100644 --- a/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt +++ b/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt @@ -50,6 +50,7 @@ class WriteFileToFileStepSpec : ShouldSpec({ val zosConnection = ZOSConnection(mockServer.hostName, mockServer.port.toString(), "test", "test", "https") val rootDir = Paths.get("").toAbsolutePath().toString() val trashDir = tempdir() + val mockDir = Paths.get(rootDir, "src", "test", "resources", "mock").toString() val itemGroup = object : TestItemGroup() { override fun getRootDirFor(child: Item?): File { return trashDir @@ -98,7 +99,7 @@ class WriteFileToFileStepSpec : ShouldSpec({ val writeFileToFileDecl = spyk( WriteFileToFileStep("test", "/u/TEST/test.txt", false, "workspace") ) - writeFileToFileDecl.setWorkspacePath("test_file.txt") + writeFileToFileDecl.setLocalFilePath(mockDir + "/test_file.txt") writeFileToFileDecl.perform( build, launcher,