digitalocean / pydo

Official DigitalOcean Python Client based on the DO OpenAPIv3 specification
https://pypi.org/project/pydo/
Apache License 2.0
84 stars 19 forks source link

Add Mocked Tests: Droplets (part 2) #209

Closed danaelhe closed 4 days ago

danaelhe commented 1 year ago

Overview Add more test coverage for Pydo, specifically for droplets

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

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
work-mohit commented 1 year ago

started working on this

work-mohit commented 1 year ago

Not working on this! Anyone else can take this

giftcup commented 5 days ago

I started working on this

giftcup commented 5 days ago

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

loosla commented 5 days ago

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!