Skip to content

systemtests: configurable database credentials#950

Merged
arogge merged 2 commits intomasterfrom
dev/joergs/master/systemtests-dbuser
Oct 8, 2021
Merged

systemtests: configurable database credentials#950
arogge merged 2 commits intomasterfrom
dev/joergs/master/systemtests-dbuser

Conversation

@joergsteffens
Copy link
Member

@joergsteffens joergsteffens commented Oct 4, 2021

This changes makes the PostgreSQL database configuration
for systemtests simpler.
Before it has be necessary to configure two database roles,
one for the current system user and one for the database user "regress".
The database admin scripts did run as the system user,
while the Bareos use the "regress" database user.
This did also require to adapt a PostgreSQL configuration file.

With this change, only database one role and no change
to the PostgreSQL default configuration is required.

For using the system user, run cmake with following parameter:

cmake -Dsystemtest_db_user=$USER ...

When systemtest_db_user is not given as parameter, the old default "regress" is used.

This PR includes commits from PR #947

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

arogge
arogge previously requested changes Oct 7, 2021
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have other commits on that branch that you probably don't want in this PR.
Also the not-so-nice XXX_REPLACE_WITH_DATABASE_DRIVER_XXX is currently required so you can run the tests with the different db backends without rerunning cmake and recompiling.
Other than that, there are also probably a lot more catalog configuration files in the systemtests directory that you did not (yet) touch.

This changes makes the PostgreSQL database configuration
for systemtests simpler.
Before it has be necessary to configure two database roles,
one for the current system user and one for the database user "regress".
The database admin scripts did run as the system user,
while the Bareos use the "regress" database user.
This did also require to adapt a PostgreSQL configuration file.

With this change, only database one role and no change
to the PostgreSQL default configuration is required.

For using the system user, run cmake with following parameter:

cmake -Dsystemtest_db_user=$USER ...

When systemtest_db_user is not given as parameter, the old default "regress" is used.
@joergsteffens joergsteffens force-pushed the dev/joergs/master/systemtests-dbuser branch from f2e43d7 to fb51dbe Compare October 8, 2021 09:22
@joergsteffens joergsteffens requested a review from arogge October 8, 2021 09:22
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works exactly like advertised. Great work, thank you!
Have a nice weekend.

@arogge arogge merged commit e1bc2f8 into master Oct 8, 2021
@arogge arogge deleted the dev/joergs/master/systemtests-dbuser branch October 8, 2021 13:18
benibr pushed a commit to benibr/bareos that referenced this pull request Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants