Skip to content
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 @@ -122,7 +122,8 @@ trait BaseStorageService extends IStorageService {

override def getSignedURL(container: String, objectKey: String, ttl: Option[Int] = None, permission: Option[String] = Option("r")): String = {
if (context.getBlobStore.toString.contains("google")) {
throw new StorageServiceException("getSignedURL method is not supported for GCP. Please use getPutSignedURL with contentType.", new Exception())
getPutSignedURL(container, objectKey, ttl, permission, Option("text/plain"))
//throw new StorageServiceException("getSignedURL method is not supported for GCP. Please use getPutSignedURL with contentType.", new Exception())
}
else {
if (permission.getOrElse("").equalsIgnoreCase("w")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ class TestGcloudStorageService extends FlatSpec with Matchers {
// gsService.deleteObject(storageContainer, "testDuplicate/", Option(true))
// gsService.deleteObject(storageContainer, "testUpload/test-extract/", Option(true))

val caught1 =
intercept[StorageServiceException]{
gsService.getSignedURL(storageContainer, "testUpload/test-data-public1.log", Option(600), Option("w"))
}
assert(caught1.getMessage.contains("getSignedURL method is not supported for GCP. Please use getPutSignedURL with contentType."))
// val caught1 = {
// intercept[StorageServiceException]{
// gsService.getSignedURL(storageContainer, "testUpload/test-data-public1.log", Option(600), Option("w"))
// }
//
// }
// assert(caught1.getMessage.contains("getSignedURL method is not supported for GCP. Please use getPutSignedURL with contentType."))

val caught2 =
intercept[StorageServiceException]{
Expand Down