-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update tests for rakeless DB admin #1
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
3 tasks
NickLaMuro
force-pushed
the
simplify_db_backup_tests
branch
from
July 7, 2021 19:30
b1db971
to
1127e3a
Compare
When updating the DatabaseAdmin tasks for the appliance console, there will be less options available to input. No longer will it ask for a type, as it will always assume you are writing to a "local file" (whether that file is a mounted NFS/SMB/etc. share or just a local disk will not be handled here). As such, ApplianceConsoleRunner no longer needs to match against the IO_MENU_OPTION_REGEXPS as it did previously, so they have been removed.
Moving forward, we will not be supporting the automatic connection of file storage backends, so this will now need to be managed by the user themselves. By association, this means the tests themselves also need to manage the connection. To ensure the connection is working properly, we connect once for creating the backup, and a separate time (in a new location) when validating the DB. This helps ensure that we are not just writing randomly to the filesystem, but the mounted network drive as expected.
NickLaMuro
force-pushed
the
simplify_db_backup_tests
branch
from
July 9, 2021 16:44
c169cea
to
040ae16
Compare
Allows running with `TESTOPTS` via rake args. So something like: $ rake sync test:nfs[--name=test_nfs_database_backup] Which allows you to test a single test at a time, and since they are about a minute or longer per test, this is a big time saver.
NickLaMuro
force-pushed
the
simplify_db_backup_tests
branch
from
July 29, 2021 23:31
040ae16
to
29670e0
Compare
This more simply allows assuming the user that we want. If we are the `vagrant` user, we will will have access to the command in the exact same way as `su` with the `root` user, but also not require the extra quoting and extra `Etc` lib logic.
The format of this config in the postgresql.conf will cause to socket files to be created, and that is excessive, so this limits it to just the RUN_DIR.
Allows changing the user in a single spot
Updates tests to now use the newly added `appliance_console_cli` commands for db restore instead of `rake` from `vmdb`. This has a couple of changes to support this: - Updates the appliance_sync.sh to be alphabetical and adds a few more files to the sync - Updates the appliance_rake_restore_patches.rb to be more genericly named and support the `appliance_console_cli` version of `PostgresAdmin` better - Have the ApplianceSecondaryDB use the `postgres` user instead of `vagrant` (less changes required to patch `PostgresAdmin` with) - Update the `DbValidator` to use the `ApplianceConsoleCli` helper library instead of `RakeHelper` (mostly the former is a slight re-write of the latter)
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 includes changes to support ManageIQ/manageiq-appliance_console#160 when it is merged.
Most the the changes are removals of IO option parsing as it is assumed that the passed in file is now available on the local file system, and we don't need to connect to a URI. Some code paths are still in place to potentially test against S3/FTP/Swift in the future, but for now they are unused.