Add "state-merkle-sql-postgres-tests" feature
This change adds a feature to guard the tests for SqlMerkleState and its
operations over a Postgres database. This allows for `just test` to work
locally, but the tests may be run in CI or against a local Postgres
instance.
@@ -35,6 +35,7 @@ cylinder = { version = "0.2", optional = true }
diesel_migrations = { version = "1.4", optional = true }
glob = { version = "0.3", optional = true }
hex = "0.4"
+lazy_static = { version = "1.4.0", optional = true }
libc = ">=0.2.35"
lmdb-zero = { version = ">=0.4.1", optional = true }
log = { version = "0.4", optional = true, features = ["std"] }
@@ -179,6 +180,10 @@ sqlite = ["diesel/sqlite", "serde", "serde_derive", "serde_json"]
state-merkle = ["cbor-codec", "log", "openssl"]
state-merkle-leaf-reader = []
state-merkle-sql = ["diesel", "diesel_migrations"]
+# This feature must be enabled to run tests using a postgres db it is not
+# enabled by default, due to its requirement of an external postgres db
+# instance.
+state-merkle-sql-postgres-tests = ["postgres", "lazy_static"]
# This feature must be enabled to run the merkle tests using a redis db. It is
# not enabled by default, due to its requirement of an external redis instance.
state-merkle-redis-db-tests = ["database-redis", "state-merkle"]
