Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IBA-mainframe-dev committed May 23, 2024
1 parent 6396f2c commit 082e3e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 082e3e7

Please sign in to comment.