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

[DPE-4179, DPE-4219] Add integration test for upgrades #135

Merged
merged 16 commits into from
May 2, 2024

Conversation

shayancanonical
Copy link
Contributor

Issue

We do not have integration tests for upgrade

Solution

Add integration tests

@shayancanonical shayancanonical changed the title [DPE-4179] Add integration test for upgrades [DPE-4179, DPE-4219] Add integration test for upgrades Apr 26, 2024
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Wow, very nice! Thank you!

P.S. I would add in the future: deploy stable, upgrade to edge(PR). But sure... after stable VM release.

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
tests/integration/conftest.py Outdated Show resolved Hide resolved
tests/integration/helpers.py Show resolved Hide resolved
Comment on lines +253 to +265
def get_application_name(ops_test: OpsTest, application_name_substring: str) -> str:
"""Returns the name of the application with the provided application name.

This enables us to retrieve the name of the deployed application in an existing model.

Note: if multiple applications with the application name exist,
the first one found will be returned.
"""
for application in ops_test.model.applications:
if application_name_substring == application:
return application

return ""
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the purpose of this?

to check if application is deployed? if so, can you check application in ops_test.model.applications?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is a helper function that is imported from mysql vm. i'd like to keep as many helpers the same as we can, so we can easily refactor them into common code in the future if necessary

tests/integration/test_upgrade.py Outdated Show resolved Hide resolved
tests/integration/test_upgrade.py Outdated Show resolved Hide resolved
tests/integration/test_upgrade.py Outdated Show resolved Hide resolved
tests/integration/test_upgrade.py Show resolved Hide resolved
tests/integration/test_upgrade.py Outdated Show resolved Hide resolved
Copy link
Contributor

@paulomach paulomach left a comment

Choose a reason for hiding this comment

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

Nice

tests/integration/test_upgrade.py Show resolved Hide resolved
@shayancanonical shayancanonical merged commit c0ad0f4 into main May 2, 2024
34 checks passed
@shayancanonical shayancanonical deleted the fix/upgrade_test branch May 2, 2024 15:45
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.

4 participants