Skip to content
Merged
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
5 changes: 5 additions & 0 deletions aws/sqs/sqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ func (s *SQS) Ready() bool {
return s.client != nil
}

// Client returns the underlying SQS client.
func (s *SQS) Client() *sqs.Client {
return s.client
}

// Receive receives a raw message or error from the queue.
// After a successful receive the message will be in flight
// until it is either deleted or the visibility timeout expires
Expand Down
18 changes: 18 additions & 0 deletions aws/sqs/sqs_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,24 @@ func TestCheckQueue(t *testing.T) {

}

func TestSQSClient(t *testing.T) {
// ARRANGE
setup()
defer teardown()

client, err := New()
ready := client.Ready()

require.Nil(t, err)
require.True(t, ready)

// ACTION
underlyingClient := client.Client()

// ASSERT
assert.NotNil(t, underlyingClient)
}

func TestSQSNewAndReady(t *testing.T) {
// ARRANGE
setup()
Expand Down