[awssdk] Typo/rename class Throp* => Thorp*
This commit is contained in:
parent
40848882f8
commit
64bf42921d
3 changed files with 6 additions and 6 deletions
|
@ -15,7 +15,7 @@ trait S3Client {
|
|||
object S3Client {
|
||||
|
||||
val defaultClient: S3Client =
|
||||
new ThropS3Client(
|
||||
new ThorpS3Client(
|
||||
S3CatsIOClient(new JavaClientWrapper {}.underlying))
|
||||
|
||||
}
|
|
@ -6,7 +6,7 @@ import net.kemitix.s3thorp.Sync._
|
|||
import software.amazon.awssdk.core.async.AsyncRequestBody
|
||||
import software.amazon.awssdk.services.s3.model.{HeadObjectRequest, PutObjectRequest}
|
||||
|
||||
private class ThropS3Client(s3Client: S3CatsIOClient) extends S3Client {
|
||||
private class ThorpS3Client(s3Client: S3CatsIOClient) extends S3Client {
|
||||
|
||||
def objectHead(bucket: Bucket, remoteKey: RemoteKey) = {
|
||||
val request = HeadObjectRequest.builder().bucket(bucket).key(remoteKey).build()
|
|
@ -19,7 +19,7 @@ class S3ClientSuite extends FunSpec {
|
|||
describe("when underlying client response is okay") {
|
||||
val expectedHash = "hash"
|
||||
val expectedLastModified = Instant.now
|
||||
val s3Client = new ThropS3Client(new S3CatsIOClient with JavaClientWrapper {
|
||||
val s3Client = new ThorpS3Client(new S3CatsIOClient with JavaClientWrapper {
|
||||
override def headObject(headObjectRequest: HeadObjectRequest) =
|
||||
IO(HeadObjectResponse.builder().
|
||||
eTag(expectedHash).
|
||||
|
@ -32,7 +32,7 @@ class S3ClientSuite extends FunSpec {
|
|||
}
|
||||
|
||||
describe("when underlying client throws NoSuchKeyException") {
|
||||
val s3Client = new ThropS3Client(new S3CatsIOClient with JavaClientWrapper {
|
||||
val s3Client = new ThorpS3Client(new S3CatsIOClient with JavaClientWrapper {
|
||||
override def headObject(headObjectRequest: HeadObjectRequest) =
|
||||
IO(throw NoSuchKeyException.builder().build())
|
||||
})
|
||||
|
@ -44,11 +44,11 @@ class S3ClientSuite extends FunSpec {
|
|||
}
|
||||
|
||||
describe("upload") {
|
||||
def invoke(s3Client: ThropS3Client, localFile: LocalFile, bucket: Bucket, remoteKey: RemoteKey) =
|
||||
def invoke(s3Client: ThorpS3Client, localFile: LocalFile, bucket: Bucket, remoteKey: RemoteKey) =
|
||||
s3Client.upload(localFile, bucket, remoteKey).unsafeRunSync
|
||||
describe("when uploading a file") {
|
||||
val md5Hash = "the-md5hash"
|
||||
val s3Client = new ThropS3Client(
|
||||
val s3Client = new ThorpS3Client(
|
||||
new S3CatsIOClient with JavaClientWrapper {
|
||||
override def putObject(putObjectRequest: PutObjectRequest, requestBody: RB) =
|
||||
IO(PutObjectResponse.builder().eTag(md5Hash).build())
|
||||
|
|
Loading…
Reference in a new issue