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

Add integration test #9

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Add integration test #9

merged 2 commits into from
Jun 14, 2024

Conversation

kelkawi-a
Copy link
Collaborator

This PR adds an integration test to ensure the application can be deployed successfully and a Github action for running integration tests on merging with the main branch.

# set a predictable model name so it can be consumed by charm-logdump-action
run: tox -e integration -- --model testing
- name: Dump logs
uses: canonical/charm-logdump-action@main
Copy link

Choose a reason for hiding this comment

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

This action is now available on the v2.6.0 release.

As a side note for the future, I recommend setting up renovatebot to get your actions and deps pinned to exact commits or versions and have renovate update them automatically.

This next bit is probably worth a CSShare, but the observability charms and identity charms have some nice CI setup to automatically merge renovatebot PRs that pass unit/integration tests.
I've adapted Hydra's renovate config for example in JIMM. Then you can setup some cool automation to get those PRs merged without user intervention.

Copy link
Collaborator Author

@kelkawi-a kelkawi-a Jun 14, 2024

Choose a reason for hiding this comment

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

To accommodate for the new integration test of running an Airbyte sync, I actually had to switch to the integration tests workflow offered by the IS Devops team to be able to use larger self-hosted Github runners.

Thanks for the heads up on the CI, will look into that!

tests/integration/conftest.py Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
Copy link

@AmberCharitos AmberCharitos left a comment

Choose a reason for hiding this comment

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

I agree with Kian's comment - is there a way we can simulate an Airbyte workflow and validate it?

tests/integration/helpers.py Outdated Show resolved Hide resolved
@kelkawi-a kelkawi-a force-pushed the integration-tests branch 5 times, most recently from 3f02245 to c9d2c7d Compare June 13, 2024 13:25
Copy link

@gtato gtato left a comment

Choose a reason for hiding this comment

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

lgtm
well done!

tests/integration/helpers.py Show resolved Hide resolved
)

await perform_temporal_integrations(ops_test)
await create_default_namespace(ops_test)
Copy link

Choose a reason for hiding this comment

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

do you have to create the default namespace manually, isn't the relation between temporal and airbyte going to create a namespace?

Copy link
Collaborator Author

@kelkawi-a kelkawi-a Jun 14, 2024

Choose a reason for hiding this comment

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

There's currently no relation between Temporal and Airbyte charms, so this step needs to be done manually.

break

if status == "succeeded":
logger.info(f"attempt {i}: job successful!")
Copy link

Choose a reason for hiding this comment

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

is this storing pikachu in the db or smth? 😄

Copy link
Collaborator Author

@kelkawi-a kelkawi-a Jun 14, 2024

Choose a reason for hiding this comment

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

Yup 😆

@kelkawi-a kelkawi-a force-pushed the integration-tests branch 13 times, most recently from 2d93185 to 4c0fdff Compare June 13, 2024 22:22
@kelkawi-a kelkawi-a force-pushed the integration-tests branch 5 times, most recently from f758c8e to 96b50cf Compare June 14, 2024 12:06
@kelkawi-a kelkawi-a force-pushed the integration-tests branch from 96b50cf to 5c325c5 Compare June 14, 2024 12:43
@kelkawi-a kelkawi-a requested a review from AmberCharitos June 14, 2024 13:17
@kelkawi-a kelkawi-a merged commit 63cbd6b into main Jun 14, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants