diff --git a/src/main/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStep.kt b/src/main/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStep.kt index 7e5dcf5..1f7b427 100644 --- a/src/main/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStep.kt +++ b/src/main/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStep.kt @@ -57,7 +57,7 @@ constructor( val file = when (fileOption) { DescriptorImpl().localFileOption -> localFilePath?.let { File(it) } DescriptorImpl().workspaceFileOption -> { - val fileWorkspacePath = workspace?.remote + '\\' + workspacePath + val fileWorkspacePath = workspace?.remote + File.separator + workspacePath File(fileWorkspacePath) } else -> throw AbortException(Messages.zdevops_classic_write_options_invalid()) 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 6ea4b19..65517ac 100644 --- a/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt +++ b/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToDatasetStepSpec.kt @@ -49,7 +49,6 @@ 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 @@ -98,7 +97,7 @@ class WriteFileToDatasetStepSpec : ShouldSpec({ val writeFileToDatasetDecl = spyk( WriteFileToDatasetStep("test", "TEST.IJMP.DATASET1", "workspace") ) - writeFileToDatasetDecl.setLocalFilePath(mockDir + "/test_file.txt") + writeFileToDatasetDecl.setWorkspacePath("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 4a5433d..18e3843 100644 --- a/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt +++ b/src/test/kotlin/org/zowe/zdevops/classic/steps/WriteFileToFileStepSpec.kt @@ -50,7 +50,6 @@ 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 @@ -99,7 +98,7 @@ class WriteFileToFileStepSpec : ShouldSpec({ val writeFileToFileDecl = spyk( WriteFileToFileStep("test", "/u/TEST/test.txt", false, "workspace") ) - writeFileToFileDecl.setLocalFilePath(mockDir + "/test_file.txt") + writeFileToFileDecl.setWorkspacePath("test_file.txt") writeFileToFileDecl.perform( build, launcher,