25 Commits

Author SHA1 Message Date
Paul Hinze
4d79c95177
Update tests and address one thing caught by them
Namely, the specified synced folder type should override the default type
2022-05-25 17:56:40 -05:00
Paul Hinze
88957f71fb
tests: Add assertion to address review comment 2022-05-25 13:42:28 -05:00
Paul Hinze
625806f448
Don't delete machine datadir when SetId("") is called
Legacy's `Machine#id=()` has an important side effect when a nil ID is
specified - it clears the contents of the machine's DataDir.

We mirrored this behavior over to gogo, with a subtle difference - we
deleted the whole DataDir vs just its children.

It turns out the Docker provider relies on the DataDir being
cleared-but-not-removed by doing a SetId dance in its InitState action.
(see 1e6259dd00d702f83048c75c5c229ce6494c4c6e).

So here we need to mirror that behavior in order for the Docker provider
to work properly.
2022-05-25 13:41:48 -05:00
sophia
07e3f7e804 Fix machine state tests 2022-05-04 09:45:51 -05:00
sophia
692dcb1b92 Allow testing plugins to have parent plugins 2022-05-02 16:50:01 -05:00
sophia
85ea3c3d1f Update machine tests 2022-05-02 15:36:47 -05:00
Chris Roberts
7e68e25994
Seed target and machine into plugins directly 2022-04-25 12:26:58 -05:00
sophia
ba0bb1d9c6
Add machine tests for boxes 2022-04-25 12:26:45 -05:00
Paul Hinze
4b0acfb513
Fix unit tests
The type needs a string pointer now. We may end up wanting a string
pointer making convenience method in the SDK at some point, but for now
I punted on that question and just made one for the test.
2022-04-25 12:26:44 -05:00
sophia
0731b5486a
Add tests for basis 2022-04-25 12:26:42 -05:00
sophia
7f0adfce78
Add tests for synced folders 2022-04-25 12:26:42 -05:00
sophia
13283a0a71
Add tests for setting machine state 2022-04-25 12:26:41 -05:00
sophia
6abbb5e8eb
Check for plugin name correctness 2022-04-25 12:26:41 -05:00
sophia
b33f1a9e01
Test guest plugin with parent 2022-04-25 12:26:41 -05:00
sophia
df0fb642b0
Add ability to get plugin with a particular instance 2022-04-25 12:26:41 -05:00
sophia
06cfbb79bf
Add more tests for guest detection 2022-04-25 12:26:41 -05:00
sophia
16e415f929
AUse test table to test for multiple configs 2022-04-25 12:26:41 -05:00
sophia
4068760588
Make test for getting guest from machine work 2022-04-25 12:26:41 -05:00
sophia
8f95994a88
Create test dummy plugins 2022-04-25 12:26:41 -05:00
sophia
1117e06e38
Add testing plugin and plugin manager 2022-04-25 12:26:40 -05:00
sophia
83921cf3f9
Add minimal project for tests 2022-04-25 12:26:40 -05:00
sophia
fb642616a8
Add minimal Machine/Target setup 2022-04-25 12:26:40 -05:00
sophia
1cfbea7437
Testing guest detection 2022-04-25 12:26:40 -05:00
sophia
9ea254735a
Set target uuid opposed to resource id
The uuid is the public identifier vs the resource id which should
be for internal operations.
The target uuid should correspond to the machine id (given by
the provider)
2022-04-25 12:26:13 -05:00
sophia
63a4b76c21
Add tests for setting machine id 2022-04-25 12:26:13 -05:00