sophia
dffa7547e8
Simplify target index to keep track of basis opposed to loading one in from the factory
2022-04-25 12:26:42 -05:00
sophia
8547cb696d
Test project
2022-04-25 12:26:42 -05:00
sophia
9179dd1abc
Use ptypes to generate testing target
2022-04-25 12:26:42 -05:00
sophia
26621c7e0b
Add tests for state bag
2022-04-25 12:26:42 -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
Paul Hinze
736e080add
Fix version printing to pass vagrant-spec
...
* Makes all help output showup on stdout like in rubyland
* Moves verbosity flags to capital Vs to get out of the way of version
* Passes version down to mitchellh/cli so it handles -v and --version
flags
* Tweaks version output to remove the leading `v` which is not output
in legacy vagrant
2022-04-25 12:26:41 -05:00
Paul Hinze
61c652c28a
Tweaks to help run spec tests with nektos/act
...
* Uniquely naming the job for use with `act -j`
* Gitignoring a `.secrets` file which act reads to get env vars
2022-04-25 12:26:41 -05:00
sophia
93f22d56ad
Bump sdk
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
147d4f3964
Seperate out testing target/project/basis
2022-04-25 12:26:40 -05:00
sophia
dea5156882
Test options for machine
2022-04-25 12:26:40 -05:00
sophia
727bf91b18
Raise error if no guest plugins found
2022-04-25 12:26:40 -05:00
sophia
1cfbea7437
Testing guest detection
2022-04-25 12:26:40 -05:00
sophia
70d0d4dfb8
Allow tests to set target config for test target
2022-04-25 12:26:40 -05:00
Paul Hinze
06ad1b4565
Fixup tests for Ruby 3.0
...
This is a pass through test failures and deprecation warnings:
* Make all ambiguous `.with(..., key: val)` use explicit hashes to
prevent test failures for argument mismatch in Ruby 3.0
* Scope down all unbounded `raise_error` to address warnings (remove
one test that was revealed to be referencing a nonexistent variable
once the raise_error was scoped.)
* Update all `any_instance` usage to new syntax to address warnings
* Allow the service cache to be cleared and do so between some tests
* Fix a small bug in with_plugin's plugin not found code path (revealed
by a scoped and_raise)
2022-04-25 12:26:40 -05:00
Paul Hinze
a684350a7b
Give CI jobs unique names
...
This helps make https://github.com/nektos/act easier to use locally,
since you often want to run `act -j jobname` when debugging a failed
workflow.
2022-04-25 12:26:40 -05:00
Paul Hinze
3381624fc2
Change test:unit output format to documentation
...
This makes rspec print out one line per test, which helps verify
progress is being made when spying on CI jobs. GitHub Actions would not
show dots when you hopped in to view a running job, presumably because
its doing line-based streaming.
2022-04-25 12:26:40 -05:00
Paul Hinze
31b88946c0
Update rspec to 3.11.0
...
This ensures that we get the Ruby 3 keywords support that landed in that
version https://github.com/rspec/rspec-mocks/pull/1394
Unfortunately this does not magically fix our test failures, just
ensures that expectations are being handled properly across Ruby
versions going forward.
2022-04-25 12:26:39 -05:00
Chris Roberts
50a7a578d3
Use initialization args for cache key
2022-04-25 12:26:39 -05:00
Chris Roberts
20d717a521
Update provisioner service plugin setup and caching
2022-04-25 12:26:39 -05:00
Chris Roberts
74ff5da434
Trace item registration in the cache
2022-04-25 12:26:39 -05:00
Chris Roberts
6d0e08942b
Convert error logger message to warn
2022-04-25 12:26:39 -05:00
Chris Roberts
64751ae8b9
Update machine ID storage to prevent lost ID
2022-04-25 12:26:39 -05:00
Chris Roberts
0a676fd3f1
Remove local provider class replacement in machine
2022-04-25 12:26:39 -05:00
Chris Roberts
39a85d1cf3
Support caching plugins within services
2022-04-25 12:26:39 -05:00
Chris Roberts
2b5bd64ec8
Remove local provider injection to machine
2022-04-25 12:26:39 -05:00
Chris Roberts
ab8dee7a72
Add some missing mappers for converting to proto
2022-04-25 12:26:39 -05:00
Chris Roberts
6dd5a3ae9b
Load plugins within #with_plugin helper
2022-04-25 12:26:39 -05:00
Chris Roberts
d070b2cc6f
Initialize cache in the proper location within Service class
2022-04-25 12:26:38 -05:00
Chris Roberts
b0b5d1191e
Update and document cacher
2022-04-25 12:26:38 -05:00
Chris Roberts
924700e103
Support method passthru to local plugins
2022-04-25 12:26:38 -05:00
Chris Roberts
0ad82cf04a
Ensure all remote plugins handle client setup
2022-04-25 12:26:38 -05:00
Chris Roberts
7e9dad2b3e
Add remote host plugin
2022-04-25 12:26:38 -05:00
Chris Roberts
f88254eb23
Let #with_plugin load plugins by type
2022-04-25 12:26:38 -05:00
sophia
2519b9b6ac
Clear target record when destroying machine
2022-04-25 12:26:38 -05:00
sophia
b7d12a0907
Get provider from remote machine
2022-04-25 12:26:38 -05:00
Chris Roberts
f183a8a810
Update provisioner service implementation
2022-04-25 12:26:38 -05:00
Chris Roberts
2f4670e48a
Define cache for services and provide it
2022-04-25 12:26:38 -05:00
Chris Roberts
8542650e38
If destination is any, only allow proto destinations
2022-04-25 12:26:38 -05:00