Skip to content

enable testing of deprecated databases (MySQL and SQLite)#573

Merged
pstorz merged 2 commits intomasterfrom
dev/pstorz/master/enable-mysql-sqlite-for-testing
Aug 19, 2020
Merged

enable testing of deprecated databases (MySQL and SQLite)#573
pstorz merged 2 commits intomasterfrom
dev/pstorz/master/enable-mysql-sqlite-for-testing

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Aug 19, 2020

The ability to create deprecated catalog databases was removed before. Unfortunately, we still need to be able to create those databases for our own tests.

This PR enables the creation of deprecated databases for only when running in our test environment. Otherwise, the creation will be denied like before.

pstorz added 2 commits August 19, 2020 14:56
In order to still allow creation of MySQL and SQlite databases when
running tests but forbid it otherwise, the environment variable
BAREOS_TEST_RUNNING is defined in all tests.

When this variable is undefined, creating databases and making tables of
MySQL and SQLite is forbidden.
@pstorz pstorz requested a review from arogge August 19, 2020 13:05
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.

On one hand I'm not happy with BAREOS_TEST_RUNNING, but then again it makes absolutely sure that you should not set this value when installing.
Good idea overall. Probably best / simplest solution to work around our issue.

@pstorz pstorz merged commit c65b6b0 into master Aug 19, 2020
@pstorz pstorz deleted the dev/pstorz/master/enable-mysql-sqlite-for-testing branch August 19, 2020 13:18
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