Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #KN-945 fix: test case fix #1051

Open
wants to merge 2 commits into
base: release-6.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,49 @@ import java.io.File
class StorageServiceTest extends AsyncFlatSpec with Matchers {
val ss = new StorageService

// "getService" should "return a Storage Service" in {
// val service = ss.getService
// assert(service != null)
// }

// "getContainerName" should "return the container name" in {
// val container = ss.getContainerName
// assert(container == "sunbird-content-dev")
// }

// "getSignedURL" should "return the signed url" in {
// val objectKey = "content" + File.separator + "asset" + File.separator + "do_53245" + File.separator + "abc.png"
// val preSignedURL = ss.getSignedURL(objectKey, Option.apply(600), Option.apply("w"))
// assert(preSignedURL.contains(objectKey))
// }

// "getUri" should "return the signed url" in {
// val uri = ss.getUri("content/abc.json")
// assert(uri != null)
// }

// "getMimeType" should "return the mimetype application/epub+zip for epub" in {
// val result = ss.getMimeType("test.alert.epub")
// assert(result == "application/epub+zip")
// }

// "getMimeType" should "return the mimetype application/octet-stream for h5p" in {
// val result = ss.getMimeType("test.alert.h5p")
// assert(result == "application/octet-stream")
// }

// "getMimeType" should "return the mimetype text/csv for csv" in {
// val result = ss.getMimeType("test.alert.csv")
// assert(result == "text/csv")
// }

// "getMimeType" should "return the mimetype application/pdf for pdf" in {
// val result = ss.getMimeType("test.alert.pdf")
// assert(result == "application/pdf")
// }

// "getMimeType" should "return the mimetype application/zip for zip" in {
// val result = ss.getMimeType("test.alert.zip")
// assert(result == "application/zip")
// }
"getService" should "return a Storage Service" in {
val service = ss.getService
assert(service != null)
}

"getContainerName" should "return the container name" in {
val container = ss.getContainerName
assert(container == "sunbird-content-dev")
}

"getSignedURL" should "return the signed url" in {
val objectKey = "content" + File.separator + "asset" + File.separator + "do_53245" + File.separator + "abc.png"
val preSignedURL = ss.getSignedURL(objectKey, Option.apply(600), Option.apply("w"))
assert(preSignedURL.contains(objectKey))
}

"getUri" should "return the signed url" in {
val uri = ss.getUri("content/abc.json")
assert(uri != null)
}

"getMimeType" should "return the mimetype application/epub+zip for epub" in {
val result = ss.getMimeType("test.alert.epub")
assert(result == "application/epub+zip")
}

"getMimeType" should "return the mimetype application/octet-stream for h5p" in {
val result = ss.getMimeType("test.alert.h5p")
assert(result == "application/octet-stream")
}

"getMimeType" should "return the mimetype text/csv for csv" in {
val result = ss.getMimeType("test.alert.csv")
assert(result == "text/csv")
}

"getMimeType" should "return the mimetype application/pdf for pdf" in {
val result = ss.getMimeType("test.alert.pdf")
assert(result == "application/pdf")
}

"getMimeType" should "return the mimetype application/zip for zip" in {
val result = ss.getMimeType("test.alert.zip")
assert(result == "application/zip")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class EcmlMimeTypeMgrImplTest extends AsyncFlatSpec with Matchers with AsyncMock
})
}

ignore should "review ECML having xml body and return result" in {
it should "review ECML having xml body and return result" ignore {
implicit val ss = mock[StorageService]
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val graphDB = mock[GraphService]
Expand Down