-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert remaining AWS interactions to use smithy4s
- Loading branch information
Showing
44 changed files
with
622 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
aws-testkit/src/main/scala/com/dwolla/aws/autoscaling/TestAutoScalingAlg.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package com.dwolla.aws.autoscaling | ||
|
||
import cats.effect.* | ||
import com.dwolla.aws.sns.SnsTopicArn | ||
import com.amazonaws.sns.TopicARN | ||
|
||
abstract class TestAutoScalingAlg extends AutoScalingAlg[IO] { | ||
override def pauseAndRecurse(topic: SnsTopicArn, lifecycleHookNotification: LifecycleHookNotification, onlyIfInState: LifecycleState): IO[Unit] = IO.raiseError(new NotImplementedError) | ||
override def pauseAndRecurse(topic: TopicARN, lifecycleHookNotification: LifecycleHookNotification, onlyIfInState: LifecycleState): IO[Unit] = IO.raiseError(new NotImplementedError) | ||
override def continueAutoScaling(l: LifecycleHookNotification): IO[Unit] = IO.raiseError(new NotImplementedError) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
aws-testkit/src/main/scala/com/dwolla/aws/cloudformation/TestCloudFormationAlg.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 9 additions & 14 deletions
23
aws-testkit/src/main/scala/com/dwolla/aws/ec2/ArbitraryInstances.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
package com.dwolla.aws.ec2 | ||
|
||
import com.amazonaws.ec2.{Instance, InstanceId, Tag as AwsTag} | ||
import org.scalacheck.* | ||
import org.scalacheck.Arbitrary.arbitrary | ||
import software.amazon.awssdk.services.ec2.model.{Instance, Tag as AwsTag} | ||
|
||
given Arbitrary[Ec2InstanceId] = Arbitrary(Gen.listOfN(17, Gen.hexChar).map(_.mkString("i-", "", "")).map(Ec2InstanceId(_))) | ||
given Arbitrary[InstanceId] = | ||
Arbitrary(Gen.listOfN(17, Gen.hexChar).map(_.mkString("i-", "", "")).map(InstanceId(_))) | ||
|
||
val genAwsTag: Gen[AwsTag] = | ||
for { | ||
key <- Gen.identifier | ||
value <- arbitrary[String] | ||
} yield AwsTag.builder().key(key).value(value).build() | ||
key <- Gen.option(Gen.identifier) | ||
value <- Gen.option(arbitrary[String]) | ||
} yield AwsTag(key, value) | ||
|
||
val genInstance: Gen[Instance] = | ||
for { | ||
id <- arbitrary[Ec2InstanceId] | ||
tags <- Gen.nonEmptyListOf(genAwsTag) | ||
} yield { | ||
Instance | ||
.builder() | ||
.instanceId(id.value) | ||
.tags(tags *) | ||
.build() | ||
} | ||
id <- Gen.option(arbitrary[InstanceId]) | ||
tags <- Gen.option(Gen.nonEmptyListOf(genAwsTag)) | ||
} yield Instance(instanceId = id.map(_.value), tags = tags) | ||
given Arbitrary[Instance] = Arbitrary(genInstance) |
3 changes: 2 additions & 1 deletion
3
aws-testkit/src/main/scala/com/dwolla/aws/ec2/TestEc2Alg.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
package com.dwolla.aws.ec2 | ||
|
||
import cats.effect.* | ||
import com.amazonaws.ec2.InstanceId | ||
import com.dwolla.aws.Tag | ||
|
||
abstract class TestEc2Alg extends Ec2Alg[IO] { | ||
override def getTagsForInstance(id: Ec2InstanceId): IO[List[Tag]] = IO.raiseError(new NotImplementedError) | ||
override def getTagsForInstance(id: InstanceId): IO[List[Tag]] = IO.raiseError(new NotImplementedError) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.