Use postrgres when flagged in TrezorAddressTest (#4768)

* Use postrgres when flagged in TrezorAddressTest

* Clean database on shutdown
This commit is contained in:
benthecarman 2022-09-15 20:07:51 -05:00 committed by GitHub
parent bcddb015ae
commit cad13182df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,7 +220,9 @@ class TrezorAddressTest extends BitcoinSWalletTest with EmptyFixture {
private def testAccountType(purpose: HDPurpose): Future[Assertion] = {
val confOverride = configForPurposeAndSeed(purpose)
implicit val conf: WalletAppConfig =
BitcoinSTestAppConfig.getNeutrinoTestConfig(confOverride).walletConf
BitcoinSTestAppConfig
.getNeutrinoWithEmbeddedDbTestConfig(() => pgUrl(), confOverride)
.walletConf
val testVectors = purpose match {
case HDPurposes.Legacy => legacyVectors
@ -282,7 +284,10 @@ class TrezorAddressTest extends BitcoinSWalletTest with EmptyFixture {
}
assertionsF.flatMap { _ =>
conf.stop().map(_ => succeed)
for {
_ <- conf.dropAll()
_ = conf.clean()
} yield succeed
}
}