15394 Commits

Author SHA1 Message Date
Paul Hinze
2906d2c7df
Populate default when synced folder guest type is not set
This helps fix the unit tests that were failing. Also adding a test for
the new behavior
2022-04-25 12:26:44 -05:00
Paul Hinze
0fc068822a
Fix rsync ownership settings in synced folders
When the opts are being pass through the go side, we get back empty
string values instead of nil values, so the `||=` assignment was not
working to populate the default owner and group. This was causing the
rsync_post hook to fail on linux guests.
2022-04-25 12:26:43 -05:00
sophia
1441ea74d2
Get sf type from folders 2022-04-25 12:26:43 -05:00
Paul Hinze
edc0e67851
nix: Add protoc-gen-go-grpc package
This command is used in `go generate` but hadn't been pulled into the
nix dependencies yet. Previously I was installing the binary via `go
get` but this is cleaner and more nix-y.

Also includes a `nix flake update` for good measure.
2022-04-25 12:26:43 -05:00
Chris Roberts
116ad81ce0
Update SDK ref 2022-04-25 12:26:43 -05:00
Chris Roberts
6fe6ee3221
Generated proto update 2022-04-25 12:26:43 -05:00
Chris Roberts
f457cbb72b
Use machine UI when processing actions 2022-04-25 12:26:43 -05:00
Chris Roberts
535f82e192
Update remote UI implementation to retain formatting 2022-04-25 12:26:43 -05:00
Chris Roberts
df0bbe343f
Support bold style and add #clear_line 2022-04-25 12:26:43 -05:00
Chris Roberts
6ba7807f7b
Add ClearLine() to UI implementations 2022-04-25 12:26:43 -05:00
Chris Roberts
71fb214d95
Add #input to terminal client and use event stream 2022-04-25 12:26:43 -05:00
Chris Roberts
2ec4bb1a13
Add remote override for #ask method 2022-04-25 12:26:42 -05:00
Chris Roberts
ee9af88606
Pass message as string instead of array 2022-04-25 12:26:42 -05:00
Chris Roberts
888fe42ce5
Update packet configuration 2022-04-25 12:26:42 -05:00
sophia
1922b80f2b
Bump sdk 2022-04-25 12:26:42 -05:00
sophia
e6c50e3d7e
Add target index tests 2022-04-25 12:26:42 -05:00
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