finch
finch copied to clipboard
feat: add `finch vm status` command
Issue #, if available: #23
Description of changes:
Adding the finch vm status
command.
Testing done:
make && make lint && make test-unit
since I did not yet updated the e2e tests where I need help to understand how to test the command
- [x] I've reviewed the guidance in CONTRIBUTING.md
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
We also need e2e tests here.
@niklasmtj Hey I see you pushed one commit labeled "apply pr feedback". We are still waiting for the changes of addressing other comments. Whenever you are ready, you can reply in the comments to let us know.
Hey, thanks. I will do that. Before that i have to get more into the mock testing. But will to this in the next couple of days.
Hey, I think I might need a helping hand here. I'm pretty new to Golang and have a hard time figuring out how the mocking is done. I did try to use the tests from the start or stop command to get a grasp on how to do it. I also got a couple of tests that are green but to be completely honest I don't know if this really tests the method in the right way. I will push my current tests and would appreciate any guidance on how to do it. Thank you in advance!
If this PR takes too long you can also go forward and finish it. Reading the results would also help me a lot to understand how it have to be done :)
Hey, I think I might need a helping hand here. I'm pretty new to Golang and have a hard time figuring out how the mocking is done. I did try to use the tests from the start or stop command to get a grasp on how to do it. I also got a couple of tests that are green but to be completely honest I don't know if this really tests the method in the right way. I will push my current tests and would appreciate any guidance on how to do it. Thank you in advance!
If this PR takes too long you can also go forward and finish it. Reading the results would also help me a lot to understand how it have to be done :)
No rush for this change. I'm happy to use this PR to help you onboard Finch slowly. I will put comments in your existing change and give suggestions.
Not a big deal but fyi :) https://github.com/runfinch/finch/blob/main/CONTRIBUTING.md?plain=1#L88
Oh I'm sorry, this makes sense. Did not know this. Were used to use it as a reference for me of the things to do :)
Started with the e2e tests but still trying to understand how to implement the tests that makes the most sense. I was thinking about adding one per each When
block to see if the status
command is returning the desired output.
In terms of syntax can I use the testVersion
as a reference point?
@niklasmtj
I was thinking about adding one per each
When
block to see if thestatus
command is returning the desired output.
If you're referring to adding an It
block to in each When
block in https://github.com/runfinch/finch/blob/main/e2e/virtual_machine_test.go, then I think it makes sense.
In terms of syntax can I use the
testVersion
as a reference point?
Sure. Every file in the e2e
package should have a consistent style. If more references are needed, you can also take a look at https://github.com/runfinch/common-tests/tree/main/tests.
Hey, just added the e2e tests and ran make && make lint && make test-unit && make test-e2e
which passed successfully. Will have a look at the conflicts if I'm able to resolve them by myself. ~But I guess I will need a bit of help here 😀~ Nevermind, seems to be an easier conflict than I thought. Testing it all through now.