[FST-5] TestSetUpHelper should use DB_ Postgres instance if available Created: 18/May/20  Updated: 17/Nov/20  Resolved: 13/Jul/20

Status: Closed
Project: folio-service-tools
Components: None
Affects versions: None
Fix versions: 1.6.0

Type: Bug Priority: P3
Reporter: Julian Ladisch Assignee: Dima Tkachenko
Resolution: Done Votes: 0
Labels: back-end, epam-spitfire
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to UXPROD-2376 Q3 2020: Spitfire Tech Debt Closed
Sprint: eHoldings Sprint 91, eHoldings Sprint 92, eHoldings Sprint 93
Story Points: 3
Development Team: Spitfire

 Description   

https://github.com/folio-org/folio-service-tools TestSetUpHelper should use DB_ Postgres instance if available.

PostgresClient constructor, by default, starts Embedded Postgres since RMB v26.
This means that if you have unit tests that do not start Embedded Postgres
explicitly, you might need to terminate Embedded Postgres by calling
PostgresClient.stopEmbeddedPostgres:
https://github.com/folio-org/raml-module-builder/blob/master/doc/upgrading.md#version-26

Purpose

Starting embedded postgres takes very long under Windows.
Many developers want to run the tests against a different postgres instance, the connection parameters are provided in the DB_ enviroment variables:
https://github.com/folio-org/raml-module-builder#environment-variables
The current code ignores the DB_ variables but it shouldn't.

Approach

Let RMB start postgres if needed.



 Comments   
Comment by Julian Ladisch [ 18/May/20 ]

The pull request is ready for Spitfire team for code review: https://github.com/folio-org/folio-service-tools/pull/30
I don't have write access to the git repository, therefore the Spitfire team needs to merge the pull request.

Generated at Thu Feb 08 23:21:54 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.