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

Improving test coverage of parts of the API used by Terraform #246

Closed
15 tasks done
rf152 opened this issue Mar 20, 2023 · 4 comments
Closed
15 tasks done

Improving test coverage of parts of the API used by Terraform #246

rf152 opened this issue Mar 20, 2023 · 4 comments

Comments

@rf152
Copy link
Contributor

rf152 commented Mar 20, 2023

I figured it's worth having an issue to capture the progress of the tests written

General Access

  • User/Password authentication
  • User/Api Token authentication

Qemu VM

  • Create
  • Read
  • Update
  • Delete
  • Cloud-init

LXC Container

  • Create
  • Read
  • Update
  • Delete

Pool

  • Create
  • Read
  • Update
  • Delete
@rf152
Copy link
Contributor Author

rf152 commented Mar 21, 2023

PR #245 Contains a fair number of tests.

I've also got a branch that I'm currently writing that adds the ability to interact with API tokens (although not their permissions at the moment), which opens up the ability to test the login with API tokens.

As to the LXC containers I've hit a bit of a wall because there is currently no method for importing / downloading templates via the go api, so that needs writing first. I'm hesitant to write the function before the layout has been fully planned (currently being discussed in #210), so I'm at a bit of an impasse.

One option may be to write a quick and dirty hack to get a template downloaded so that I can write tests for the LXC stuff, which should then get us most of the coverage for testing the parts that are used by the Terraform API

@mleone87
Copy link
Collaborator

nice! feel free to notify me when it's ready to merge!

@rf152
Copy link
Contributor Author

rf152 commented Apr 5, 2023

@mleone87 that's as much as I can do at the moment, until we have a method for importing LXC containers, so I think it makes sense to merge #245, and I'll do another pull request when I've written a hack for importing LXC containers

@rf152
Copy link
Contributor Author

rf152 commented May 5, 2023

Cloud-init now sorted in #258

Think this puts us in a good position to start refactoring the whole application

@rf152 rf152 closed this as completed May 5, 2023
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

No branches or pull requests

2 participants