Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed Jan 17, 2023
1 parent 715a785 commit e015eaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class SqsQueuesFactorySpec extends Specification {

void 'return sqs if there is no issue'() {
expect:
factory.sqsQueues(provider, mapper, simpleQueueService, Optional.empty(), environment) instanceof SqsQueues
factory.sqsQueues(provider, mapper, simpleQueueService, environment) instanceof SqsQueues
}

void 'return local if there is issue'() {
when:
factory.sqsQueues(provider, mapper, simpleQueueService, Optional.empty(), environment) instanceof LocalQueues
factory.sqsQueues(provider, mapper, simpleQueueService, environment) instanceof LocalQueues

then:
1 * provider.credentials >> { throw new SdkClientException('login failed') }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class SqsQueuesFactorySpec extends Specification {

void 'return sqs if there is no issue'() {
expect:
factory.sqsQueues(provider, mapper, simpleQueueService, Optional.empty(), environment) instanceof SqsQueues
factory.sqsQueues(provider, mapper, simpleQueueService, environment) instanceof SqsQueues
}

void 'return local if there is issue'() {
when:
factory.sqsQueues(provider, mapper, simpleQueueService, Optional.empty(), environment) instanceof LocalQueues
factory.sqsQueues(provider, mapper, simpleQueueService, environment) instanceof LocalQueues

then:
1 * provider.resolveCredentials() >> { throw SdkClientException.create('login failed') }
Expand Down

0 comments on commit e015eaa

Please sign in to comment.