Skip to content

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

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

Merged
merged 6 commits into from
Mar 12, 2025

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 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 2 times, most recently 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

@fruch fruch force-pushed the replace_aws_mock_tests branch 3 times, most recently from 846923d to 40813ee Compare March 5, 2025 16:08
@fruch fruch marked this pull request as ready for review March 5, 2025 16:08
@fruch fruch added test-provision-aws Run provision test on AWS and removed test-provision-aws Run provision test on AWS labels Mar 5, 2025
@fruch fruch requested a review from a team March 5, 2025 16:09
soyacz
soyacz previously approved these changes Mar 6, 2025
Copy link
Contributor

@soyacz soyacz left a comment

Choose a reason for hiding this comment

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

This looks like simplification and more stable tests - LGTM.
I saw some failure related to docker pull rate limit thou - possibly need to fix something here/in pipeline

@fruch
Copy link
Contributor Author

fruch commented Mar 6, 2025

This looks like simplification and more stable tests - LGTM.
I saw some failure related to docker pull rate limit thou - possibly need to fix something here/in pipeline

Seems like it's happening across the board, I'm guessing we are hitting our account limit, and it's not related to those changes, on the contrary, we are removing some docker usage from our CI

@fruch fruch added New Hydra Version PR# introduces new Hydra version and removed test-provision-docker labels Mar 9, 2025
@fruch fruch force-pushed the replace_aws_mock_tests branch 3 times, most recently from 95c9659 to 5716235 Compare March 12, 2025 16:48
fruch added 5 commits March 12, 2025 20:14
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
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 9886b91 to 1f6271a Compare March 12, 2025 18:15
@fruch fruch removed the New Hydra Version PR# introduces new Hydra version label Mar 12, 2025
@fruch fruch added the New Hydra Version PR# introduces new Hydra version label Mar 12, 2025
@fruch fruch merged commit aeb1256 into scylladb:master Mar 12, 2025
5 checks passed
@roydahan roydahan added backport/perf-v16 backport/none Backport is not required and removed backport/none Backport is not required backport/perf-v16 labels Mar 20, 2025
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 New Hydra Version PR# introduces new Hydra version promoted-to-master test-integration Enable running the integration tests suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants