New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/franku/master/sql find #361
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
franku
force-pushed
the
dev/franku/master/sql-find
branch
2 times, most recently
from
December 9, 2019 12:20
f551282
to
472d2d6
Compare
pstorz
approved these changes
Dec 10, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
franku
force-pushed
the
dev/franku/master/sql-find
branch
from
December 12, 2019 08:10
27ed794
to
8b50b03
Compare
- MySql compatibility
- before, backend directories were stored in an alist containing pointers to c-strings - store (default) parameter for directories in a std::vector - the vector will be moved to the desination after config parser finishes - tests: add catalog unittest and systemtest
- do not run the catalog unittest with 'make test' or 'ctest' - the catalog-'unittest' will be run from the catalog-'systemtest'
- fixed: systemtests now delete the database and drop all tables before continuing - add insert statements for job and client table - use std::vector& for the result output buffer - the testrunner of the catalog systemtest clears the database and then calls the catalog unittest - correct paths to database cleanup scripts - build catalog unittest using the new cmake macro - improve catalog systemtest for sqlite3
franku
force-pushed
the
dev/franku/master/sql-find
branch
from
December 12, 2019 12:39
8b50b03
to
33fc397
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a systemtest (and a unittest) for the database request function BareosDb::FindLastJobStartTimeForJobAndClient().
The systemtest itself prepares the database like all other systemtests and then calls the unittest which in turn will execute insert statements to prepare the data. After that the request function will be called to retrieve the data from the database. The test checks the data for correctness.
The alist* bakend_dirs was replaced by a std::vector because this makes it easier to provide the data.
The output data from FindLastJobStartTimeForJobAndClient will be returned into a std::vector instead of poolmem.
CFG_TYPE_STR_VECTOR_OF_DIRS was introduced as a new config parameter type, because this type will be mapped to "DIRECTORY_LIST" especially for documentation.
This PR also fixes the directory name of another test (run-on-client-connect-interval)
There was a new return code introduced: BareosDb::SqlFindResult which lets the programm distinguish if the db request failed, succeeded or the result set is empty.