func deleteQueue(s *sqs.SQS, queueName string) { resp, err := s.GetQueueUrl(&sqs.GetQueueUrlInput{QueueName: aws.String(queueName)}) if err != nil { So(err.Error(), ShouldContainSubstring, "AWS.SimpleQueueService.NonExistentQueue") } else { _, e := s.DeleteQueue(&sqs.DeleteQueueInput{QueueUrl: resp.QueueUrl}) So(e, ShouldBeNil) } }