Skip to content

systemtests: fix plugin postgresql testrunner-*#1947

Merged
BareosBot merged 5 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/fix-plugin-postgresql-testrunner-debian
Sep 24, 2024
Merged

systemtests: fix plugin postgresql testrunner-*#1947
BareosBot merged 5 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/fix-plugin-postgresql-testrunner-debian

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Sep 3, 2024

  • commit 475b131 was needed to extract the correct major version
    it was reworked to use pg_lsclusters to detect server version
    instead psql tool version.
  • if installed postgresql is lower than major 10 the tests is
    marked as skipped.
  • the pg_*cluster commands need to be run as root user.
    the systemtest will now check that condition and mark the test
    as skipped if not.
  • move redondant code for PG_VERSION to setup_local_db.sh
  • move redondant check PG_VERSION > 10 to setup_local_db.sh
  • add --no-psqlrc flag to PGSQL command

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)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
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
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@bruno-at-bareos bruno-at-bareos added this to the 24.0.0 milestone Sep 3, 2024
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-plugin-postgresql-testrunner-debian branch from 478938d to 273d486 Compare September 11, 2024 15:51
@bruno-at-bareos bruno-at-bareos changed the title systemtests: fix plugin postgresql testrunner-debian systemtests: fix plugin postgresql testrunner-* Sep 11, 2024
@joergsteffens
Copy link
Member

As I started reviewing #1948, I continued on it. After that is finished, we can continue here. (if this is more convenient, we can also reverse the order).

@bruno-at-bareos
Copy link
Contributor Author

As I started reviewing #1948, I continued on it. After that is finished, we can continue here. (if this is more convenient, we can also reverse the order).

Thanks for the review in #1948 I will make all the changes here, so we keep a "normal" workflow.

bruno-at-bareos and others added 5 commits September 24, 2024 12:46
- commit 475b131 was needed to extract the correct major version
  it was reworked to use `pg_lsclusters` to detect server version
  instead `psql` tool version.
- if installed postgresql is lower than major 10 the tests is
  marked as skipped.
- the `pg_*cluster` commands need to be run as root user.
  the systemtest will now check that condition and mark the test
  as `skipped` if not.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
fix all testrunner (except debian)

- move redondant code for PG_VERSION to `setup_local_db.sh`
- move redondant check PG_VERSION > 10 to `setup_local_db.sh`
- add --no-psqlrc flag to PGSQL command

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
For testrunner-debian, we want to pick up the highest available
major version pg_lsclusters will handle (mostly main cluster).
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@BareosBot BareosBot force-pushed the dev/bruno/master/fix-plugin-postgresql-testrunner-debian branch from 588a3ae to a3c2ae7 Compare September 24, 2024 12:46
@BareosBot BareosBot merged commit a27fb94 into bareos:master Sep 24, 2024
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/fix-plugin-postgresql-testrunner-debian branch November 25, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants