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

WIP - [AAP-38819] - Setting up pytest + S3 (Minio) + example test #57

Closed
wants to merge 2 commits into from

Conversation

msmagnanijr
Copy link
Contributor

[AAP-38819] Setting up pytest + S3 (Minio) + example test

AAP-38819

Description

WIP

What is being changed?

  • Minio setup for local and CI testing.
  • Addition of an initial test scenario to validate CCSPv2 report generation with S3 backend.
  • Integration with pytest to run automated tests using Minio as a simulated backend.

Why is this change needed?

  • Enables testing of metrics-utility S3 storage functionality without relying on an external environment.
  • Facilitates test automation in the CI pipeline.
  • Ensures that report generation works correctly with the S3 backend before full implementation.

How does this change address the issue?

  • Uses Minio as a local S3 backend for testing.
  • Defines the necessary setup to run locally and in CI.
  • Implements an initial test case covering CCSPv2 report generation.

Expected Results

  • ✅ The Minio environment starts successfully.
  • ✅ The metrics-utility-test bucket is created successfully.
  • S3 report generation tests run and pass without errors.

@msmagnanijr msmagnanijr self-assigned this Jan 31, 2025
@msmagnanijr msmagnanijr marked this pull request as draft January 31, 2025 22:48
Copy link

sonarqubecloud bot commented Feb 3, 2025

. .venv/bin/activate || exit 1;
echo "Running automation billing data collection...";
python manage.py gather_automation_controller_billing_data --ship --since=20d || exit 1;
Copy link

@dhaustein dhaustein Feb 3, 2025

Choose a reason for hiding this comment

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

I don't think this is going to work outside of the awx container. Martin's PR #51 is about ./manage.py build_report and not gather_automation_controller_billing_data 😢

Copy link
Collaborator

@himdel himdel Feb 17, 2025

Choose a reason for hiding this comment

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

👍 That's what #52 is for :)

It connects to a custom postgres instance, so this would just need a compose entry for that instance too.

Will test when #52 gets in :)

@himdel himdel changed the title WIP - [AAP-39919] - Setting up pytest + S3 (Minio) + example test WIP - [AAP-38819] - Setting up pytest + S3 (Minio) + example test Feb 20, 2025
@himdel himdel closed this in #71 Feb 26, 2025
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.

3 participants