Skip to content

Commit

Permalink
Merge pull request #129 from hmrc/SAR-2047
Browse files Browse the repository at this point in the history
SAR-2047 - Update mongo dependency to fix exceptions
  • Loading branch information
Michael-RJ authored May 11, 2018
2 parents 83e7942 + 4494c5a commit 3b68329
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/repositories/LockoutMongoRepository.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class LockoutMongoRepository @Inject()(implicit mongo: ReactiveMongoComponent)
setIndex()

def dropDb: Future[Unit] = {
collection.drop()
collection.drop(failIfNotFound = false)
setIndex().map(_ => Unit)
}

Expand Down
3 changes: 2 additions & 1 deletion it/controllers/matching/LockoutStatusControllerISpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import org.scalatest.BeforeAndAfterEach
import play.api.http.Status._
import play.modules.reactivemongo.ReactiveMongoComponent
import repositories.LockoutMongoRepository
import scala.concurrent.ExecutionContext.Implicits.global

class LockoutStatusControllerISpec extends ComponentSpecBase with BeforeAndAfterEach {
implicit lazy val mongo = app.injector.instanceOf[ReactiveMongoComponent]

object TestLockoutMongoRepository extends LockoutMongoRepository

override def beforeEach(): Unit = {
await(TestLockoutMongoRepository.dropDb)
await(TestLockoutMongoRepository.drop)
}

"checkLockoutStatus" should {
Expand Down
2 changes: 1 addition & 1 deletion it/repositories/LockoutMongoRepositorySpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LockoutMongoRepositorySpec extends UnitSpec with GuiceOneAppPerSuite with
object TestLockoutMongoRepository extends LockoutMongoRepository

override def beforeEach(): Unit = {
await(TestLockoutMongoRepository.dropDb)
await(TestLockoutMongoRepository.drop)
}

"lockoutAgent" should {
Expand Down
4 changes: 2 additions & 2 deletions project/MicroServiceBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ private object AppDependencies {
private val scalaJVersion = "2.3.0"
private val cucumberVersion = "1.2.5"

private val reactiveMongoVersion = "6.1.0"
private val reactiveMongoVersion = "7.0.0"

private val wiremockVersion = "2.5.1"

private val bootstrapVersion = "1.4.0"
private val bootstrapVersion = "1.5.0"


val compile = Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.15
sbt.version=0.13.17

0 comments on commit 3b68329

Please sign in to comment.