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

feature(aws-unittests): new unit test module for test aws services #9910

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fruch
Copy link
Contributor

@fruch fruch commented Jan 23, 2025

in this commit we would be using moot in a server mode, running
inside a thread

in this way we don't have external services dependencies or
need to spin up docker instance with a mock implementation.

for now it's just demonstrate what we can achieve with it

  • cover Keystore implementation
  • cover AWS Provisioning (on case)
  • cover listing of AMIs

Testing

  • [ ]

PR pre-checks (self review)

  • I added the relevant backport labels
  • I didn't leave commented-out/debugging code

Reminders

  • Add New configuration option and document them (in sdcm/sct_config.py)
  • Add unit tests to cover my changes (under unit-test/ folder)
  • Update the Readme/doc folder relevant to this change (if needed)

fruch added 3 commits January 23, 2025 12:19
we need this package for better unittesting our aws integration code
the aws pricing model is suffering from cyclic depedecies
this change is a workaround avoid it, if we aren't really
gonna use the pricing code
with newer version of boto3 (or under moto), this call would be failing
if region is not defined
@fruch fruch requested review from soyacz and enaydanov January 23, 2025 15:30
@fruch fruch added backport/none Backport is not required test-provision-docker test-integration Enable running the integration tests suite labels Jan 23, 2025
@fruch fruch force-pushed the replace_aws_mock_tests branch from 8ba4635 to 5c92a70 Compare January 23, 2025 16:16
fruch added 2 commits January 26, 2025 11:28
in this modulde we would be using moto in a server mode, running
inside a thread

in this way we don't have external services depedecies or
need to spin up docker instance with a mock implemention.

for now it's just demonstrate what we can achive with it

* cover Keystore implmention
* cover AWS Provisioning (on case)
* cover listing of AMIs
since we have replacement for the tests using this mock, we remove
all the code related to it
@fruch fruch force-pushed the replace_aws_mock_tests branch from 5c92a70 to e2e3429 Compare January 26, 2025 09:28
@scylladbbot
Copy link

@fruch new branch branch-2025.1 was added, please add backport label if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/none Backport is not required test-integration Enable running the integration tests suite test-provision-docker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants