Skip to content

Commit

Permalink
mock
Browse files Browse the repository at this point in the history
  • Loading branch information
THWiseman committed Nov 7, 2023
1 parent b5e3c37 commit 7f9044e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package cromwell.backend.impl.tes

import common.mock.MockSugar
import cromwell.core.logging.JobLogger
import cromwell.core.path.NioPath
import cromwell.filesystems.blob.{BlobFileSystemManager, BlobPath, WSMBlobSasTokenGenerator}
import org.mockito.ArgumentMatchers.any
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

import java.time.Duration
import java.time.temporal.ChronoUnit
import scala.util.{Failure, Try}
Expand Down Expand Up @@ -79,12 +81,15 @@ class TesAsyncBackendJobExecutionActorSpec extends AnyFlatSpec with Matchers wit
def generateMockBlobPath: BlobPath = {
val mockBlobPath = mock[BlobPath]
mockBlobPath.md5 returns "BLOB_MD5"

val mockFsm = generateMockFsm
mockBlobPath.getFilesystemManager returns mockFsm

val mockNioPath: NioPath = mock[NioPath]
mockBlobPath.nioPath returns mockNioPath
mockBlobPath
}


//Path to a file that isn't a blob file
def generateMockDefaultPath: cromwell.core.path.Path = {
val mockDefaultPath: cromwell.core.path.Path = mock[cromwell.core.path.Path]
Expand Down

0 comments on commit 7f9044e

Please sign in to comment.