15354 Commits

Author SHA1 Message Date
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
Chris Roberts
3e7f72b9b0
Extract direct arguments to use for spec 2022-04-25 12:26:37 -05:00
Chris Roberts
987998aa41
Grab cacher from local instance 2022-04-25 12:26:37 -05:00
Chris Roberts
b976be72bd
Simplify cacher 2022-04-25 12:26:37 -05:00
Chris Roberts
d82702064f
Only deactivate remote plugin manager if activated 2022-04-25 12:26:37 -05:00
Chris Roberts
83ca40e239
Refactor Ruby service implementations
Update the Ruby service implementations to use the funcspec util
    module for generating spec content. A helper method is now used
    for generating a parent class for services to subclass which
    automatically includes all required modules for usage.
2022-04-25 12:26:37 -05:00
Paul Hinze
ff86d86ac8
Provisioner Plugins 2022-04-25 12:26:37 -05:00
Paul Hinze
8b6ef27a0f
Fix multiple synced folder handling in server mode
There was a hash assignment that was overriding values when there were
multiple synced folders for a given implementation.

Includes some stub-tastic unit tests to help verify the hash munging
behavior does what it's supposed to do going forward.
2022-04-25 12:26:37 -05:00
Chris Roberts
2b38005dfb
Include namespace for wrapper type 2022-04-25 12:26:37 -05:00
Chris Roberts
4679d39039
Fix name and method call in folders mappers 2022-04-25 12:26:37 -05:00
sophia
94698704ab
Fix some small errors 2022-04-25 12:26:37 -05:00
Chris Roberts
3f619459b5
Update plugin SDK ref 2022-04-25 12:26:37 -05:00
Chris Roberts
b10ff0d51d
Sort guest plugins before running detection
When detecting the machine guest, first sort the guest plugins
    by the number of ancestors. This allows for returning on the
    first match instead of requiring running the detection process
    on every registered guest plugin.
2022-04-25 12:26:36 -05:00
Chris Roberts
bdf8527ab0
Generated proto update 2022-04-25 12:26:36 -05:00
Chris Roberts
c7fdd92eb5
Add folders type to mappers 2022-04-25 12:26:36 -05:00
Chris Roberts
14d2d66d29
Use folders and options types in client/services 2022-04-25 12:26:36 -05:00
Chris Roberts
c32ba38b70
Add mappers for Folders type 2022-04-25 12:26:36 -05:00
Chris Roberts
0cb053c20c
Add a Folders type 2022-04-25 12:26:36 -05:00
Chris Roberts
c00eb5a5a8
Store options value as hash 2022-04-25 12:26:36 -05:00
Chris Roberts
f507a3d7ff
Add todo note about deleted entries 2022-04-25 12:26:36 -05:00
Chris Roberts
b7f074e492
Remove debugging artifacts 2022-04-25 12:26:36 -05:00
Chris Roberts
ac8790b694
Remove deleteion of host and machine index entries 2022-04-25 12:26:36 -05:00
Chris Roberts
7cb620da23
Remove method which is no longer used 2022-04-25 12:26:36 -05:00
Chris Roberts
bcff6d6284
Re-enable using local provider from machine 2022-04-25 12:26:35 -05:00
Chris Roberts
9a6f5fa316
Don't unany mapping if source value is proto 2022-04-25 12:26:35 -05:00