File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
model/src/test/kotlin/config Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -248,10 +248,20 @@ class OrtConfigurationTest : WordSpec({
248248 schema: public
249249 username: username
250250 password: password
251+ provenanceStorage:
252+ postgresStorage:
253+ connection:
254+ url: "postgresql://your-postgresql-server:5444/your-database"
255+ schema: public
256+ username: username
257+ password: password
251258 """.trimIndent()
252259 )
253260
254- val env = mapOf("ort.scanner.storages.postgres.connection.password" to "envPassword")
261+ val env = mapOf(
262+ "ort.scanner.storages.postgres.connection.password" to "envPassword",
263+ "ort.scanner.provenanceStorage.postgresStorage.connection.password" to "envPassword"
264+ )
255265
256266 withEnvironment(env) {
257267 val config = OrtConfiguration .load(
@@ -272,6 +282,16 @@ class OrtConfigurationTest : WordSpec({
272282 password shouldBe " envPassword"
273283 }
274284 }
285+
286+ config.scanner.provenanceStorage shouldNotBeNull {
287+ postgresStorage.shouldBeInstanceOf<PostgresStorageConfiguration >().also { postgresStorage ->
288+ with(postgresStorage.connection) {
289+ username shouldBe " username"
290+ schema shouldBe " public"
291+ password shouldBe " envPassword"
292+ }
293+ }
294+ }
275295 }
276296 }
277297
You can’t perform that action at this time.
0 commit comments