Have EmbeddedPg check PG_ENABLED value (#4791)

This commit is contained in:
benthecarman 2022-09-20 06:55:40 -05:00 committed by GitHub
parent 193922c9c5
commit c0443a972d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,10 @@ trait EmbeddedPg extends BeforeAndAfterAll { this: Suite =>
lazy val pgEnabled: Boolean = {
val config = ConfigFactory.load()
val isEnv = sys.env.contains("PG_ENABLED")
val isEnv = sys.env
.get("PG_ENABLED")
.exists(s => s.equalsIgnoreCase("true") || s == "1")
val isConfig = {
if (config.hasPath("bitcoin-s.testkit.pg.enabled")) {
config.getBoolean("bitcoin-s.testkit.pg.enabled")