Skip to content

Commit

Permalink
Attempt a unit test for custom s3 endpoint url
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Doan <andy@foundries.io>
  • Loading branch information
doanac committed Apr 25, 2019
1 parent beeab0a commit aa15cf6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.advancedtelematic.data.DataType.{ObjectId, ObjectIdOps, ObjectStatus,
import com.advancedtelematic.libats.data.DataType.Namespace
import com.advancedtelematic.util.ResourceSpec.ClientTObject
import com.advancedtelematic.util.TreeHubSpec
import com.amazonaws.regions.Regions
import org.scalatest.time.{Seconds, Span}

import scala.async.Async.{async, await}
Expand All @@ -27,6 +28,11 @@ class S3BlobStoreIntegrationSpec extends TreeHubSpec {

override implicit def patienceConfig = PatienceConfig().copy(timeout = Span(15, Seconds))

test("can construct custom") {
val creds = new S3Credentials("", "", "", "", Regions.fromName("us-central-1"), "https://storage.googleapis.com")
val s3BlobStore = new S3BlobStore(creds, false)
}

test("can store object") {
val tobj = TObject(ns, ObjectId.parse("ce720e82a727efa4b30a6ab73cefe31a8d4ec6c0d197d721f07605913d2a279a.commit").toOption.get, 0L, ObjectStatus.UPLOADED)
val blob = ByteString("this is byte.")
Expand Down

0 comments on commit aa15cf6

Please sign in to comment.