Skip to content

systemtests: skip mysql tests if root#1197

Merged
joergsteffens merged 2 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/mysql-test-skip-if-root
Jul 7, 2022
Merged

systemtests: skip mysql tests if root#1197
joergsteffens merged 2 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/mysql-test-skip-if-root

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Jun 27, 2022

Actually every build and test in container with podman will result with at least

326 - system:py2plug-fd-contrib-bareos_tasks_mysql (Failed)
327 - system:py3plug-fd-contrib-bareos_tasks_mysql (Failed)
335 - system:py2plug-fd-mariabackup (Failed)
336 - system:py3plug-fd-mariabackup (Failed)
347 - system:py3plug-fd-contrib-mysql_dump (Failed)

As prepared in task 5147, we will skip mysql test if run as root.

This PR introduce a function in function skip_if_root in systemtests/scripts/functions and call it in every mysql test.

Resulting in

Start 345: system:py3plug-fd-contrib-mysql_dump
Test #345: system:py3plug-fd-contrib-mysql_dump ....***Skipped   0.02 sec

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
    - [ ] If backport: add original PR number and target branch at top of this file: Backport of PR#000 to bareos-2x
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

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/mysql-test-skip-if-root branch from 986c130 to d72fa34 Compare July 4, 2022 07:46
- Added a function skip_if_root in systemtests/scripts/functions
- Check running user and skip mysql test if root (podman)

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/mysql-test-skip-if-root branch from d72fa34 to 61065e4 Compare July 4, 2022 07:58
@alaaeddineelamri alaaeddineelamri self-requested a review July 4, 2022 08:01
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri left a comment

Choose a reason for hiding this comment

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

👍

@joergsteffens joergsteffens merged commit 5a0e6e2 into bareos:master Jul 7, 2022
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/mysql-test-skip-if-root branch August 23, 2022 08:31
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.

3 participants