Skip to content
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

Fix acrarollback tests #642

Merged
merged 2 commits into from
Feb 27, 2023
Merged

Fix acrarollback tests #642

merged 2 commits into from
Feb 27, 2023

Conversation

Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented Feb 27, 2023

  1. Found, that tests for acra-rollback do nothing and don't check that last query returns anything before iteration:
result = self.engine_raw.execute(acrarollback_output_table.select())
        result = result.fetchall()
        for data in result:
            self.assertIn(data[0], source_data)

And they succeed even with errors like key 'keypair1' not found.
So, fixed the name of keypairs and added additional check that there are anything to iterate.

  1. Found, that our GetDriverConnectionStringHost method incorrectly parses usernames that don't look like valid schema for net.URL. So, replaced custom parsing logic to use an appropriate function from the target driver that knows how to deal with its own custom connection string.

Checklist

@Lagovas Lagovas requested a review from Zhaars February 27, 2023 18:33
@Lagovas Lagovas merged commit 12e0461 into master Feb 27, 2023
@Lagovas Lagovas deleted the lagovas/fix-acrarollback-tests branch February 27, 2023 22:24
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