Skip to content

Commit 5b99e66

Browse files
small comment fix
1 parent a915b70 commit 5b99e66

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

pkg/source/sqs/sqs_source_test.go

+14
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ func TestMain(m *testing.M) {
3030
os.Exit(exitVal)
3131
}
3232

33+
// TestNewSqsSource_ConnectionCheck tests that the SQS source fails on start-up if the connection to SQS fails
34+
func TestNewSqsSource_ConnectionCheck(t *testing.T) {
35+
assert := assert.New(t)
36+
37+
target, err := configFunction(&configuration{
38+
QueueName: "not-exists",
39+
Region: testutil.AWSLocalstackRegion,
40+
RoleARN: `arn:aws:sqs:us-east-1:00000000000:not-exists`,
41+
ConcurrentWrites: 15,
42+
})
43+
assert.Nil(target)
44+
assert.EqualError(err, "NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors")
45+
}
46+
3347
// func newSQSSourceWithInterfaces(client sqsiface.SQSAPI, awsAccountID string, concurrentWrites int, region string, queueName string) (*sqsSource, error) {
3448
func TestNewSQSSourceWithInterfaces_Success(t *testing.T) {
3549
if testing.Short() {

pkg/target/eventhub_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,7 @@ func TestNewEventHubTarget_ConnVarsErr(t *testing.T) {
396396
assert.Nil(tgt)
397397
}
398398

399-
// NewEventHubTarget should fail if we can't reach EventHub, commented out this test until we look into https://github.com/snowplow-devops/stream-replicator/issues/151
400-
// Note that when we do so, the above tests will need to be changed to use some kind of mock
399+
// NewEventHubTarget should fail if we can't reach EventHub
401400
func TestNewEventHubTarget_NoVars(t *testing.T) {
402401
assert := assert.New(t)
403402
// Test that we can initialise a client with Key and Value

0 commit comments

Comments
 (0)