pydo icon indicating copy to clipboard operation
pydo copied to clipboard

Add Mocked Tests: Droplets (part 2)

Open danaelhe opened this issue 2 years ago • 2 comments

Overview Add more test coverage for Pydo, specifically for droplets

Mocked Tests: tests/mocked/ Tests in the mocked directory include:

  • Tests that validate the generated client has all the expected classes and methods for the respective API resources and operations.
  • Tests that exercise individual operations against mocked responses.

These tests do not act against the real API so no real resources are created.

To run mocked tests, run:

make test-mocked

Instructions

  1. Clone this repo.
  2. If you haven't already, install Python (version: >= 3.7.2) through their official installer.
  3. CD into the directory and run make install
  4. View file: tests/mocked/test_droplets.py
  5. Add tests for droplets.destroy_with_associated_resources_selective, droplets. destroy_with_associated_resources_dangerous, droplets. get_destroy_associated_resources_status, droplets. destroy_retry_with_associated_resources, droplets.list_neighbors_ids
  6. API documentation is here
  7. Pydo Documentation is here

danaelhe avatar Sep 28 '23 18:09 danaelhe

started working on this

work-mohit avatar Sep 30 '23 16:09 work-mohit

Not working on this! Anyone else can take this

work-mohit avatar Oct 04 '23 19:10 work-mohit

I started working on this

giftcup avatar Oct 16 '24 05:10 giftcup

After making the changes, are these the instructions I'm to follow to make a commit: https://github.com/digitalocean/pydo/blob/main/CONTRIBUTING.md#releasing-pydo? because when I run make changes I get the error: go: modules disabled by GO111MODULE=off; see 'go help modules' make: *** [Makefile:105: _install_github_release_notes] Error 1 and when I do BUMP=feature make bump_version I get another error => installing/updating sembump tool go: modules disabled by GO111MODULE=off; see 'go help modules' make: *** [Makefile:121: _install_sembump] Error 1.

I'm quite confused if I'm supposed to also make any changes to the Makefile

giftcup avatar Oct 16 '24 08:10 giftcup

Hi @giftcup,

Thanks for diving into this task! Just a quick note: you don’t need to release godo and run the make commands like make changes. To run your mocked tests, simply use make test-mocked. The Makefile doesn’t need any changes for this issue.

When you’re ready to commit your changes, you’ll need to fork the repository. You can follow the instructions here: Contribute to someone's repository.

Happy coding!

loosla avatar Oct 16 '24 13:10 loosla