370 Commits

Author SHA1 Message Date
Chris Roberts
aec4d13e21 Set configuration after successful init 2022-06-29 11:46:41 -07:00
Chris Roberts
8c40214d61 Update project to use cleanup, not shutdown targets 2022-06-29 11:46:41 -07:00
Chris Roberts
822b2af8a5 Set target configuration from vagrantfile before save 2022-06-28 11:07:52 -07:00
Chris Roberts
e9353ac566 Remove some extraneous logger output 2022-06-28 09:49:28 -07:00
Chris Roberts
2e2966ae9e Remove test basis config helper function 2022-06-28 08:54:29 -07:00
Chris Roberts
721eb7428f Add error checking during test project setup 2022-06-28 08:53:57 -07:00
Chris Roberts
5e474995cd Allow TestTargetOption to accept target or machine 2022-06-28 08:53:39 -07:00
Chris Roberts
0be75e6d1e Add some comments on functions 2022-06-28 08:53:04 -07:00
Chris Roberts
d802377b52 Include project resource id when loading from ref 2022-06-28 08:39:06 -07:00
Chris Roberts
04036a99ce Remove error check for test machine 2022-06-28 08:38:22 -07:00
Chris Roberts
517b218337 Test helpers file 2022-06-27 18:13:00 -07:00
Chris Roberts
1e2cf39faa Update target creation to force fatal on error 2022-06-27 18:12:46 -07:00
Chris Roberts
aca9eb8a25 Move test helper functions to isolated file 2022-06-27 18:11:31 -07:00
Chris Roberts
f0a7d87f31 Only load target with vagrantfile if config exists 2022-06-27 18:10:40 -07:00
Chris Roberts
4475acb98d Cleanup target init and do not create via WithTargetRef 2022-06-27 18:09:33 -07:00
Chris Roberts
8a8e89d413 Explicitly create target from project 2022-06-27 18:08:43 -07:00
Chris Roberts
9783951719 Ensure caching and use default provider value 2022-06-27 18:08:02 -07:00
Chris Roberts
70d9fa9faf Use getters to ensure value 2022-06-27 11:24:12 -07:00
Chris Roberts
ee85eed227 Check that project ref is set before using 2022-06-27 11:23:57 -07:00
Chris Roberts
605c7f9d9f Force fatal when failing to setup machine 2022-06-27 11:23:27 -07:00
Chris Roberts
6f7e17a8b3 Update how configuration is set in tests 2022-06-27 11:22:51 -07:00
Chris Roberts
da0ba680ac Update testing helper setups for signature change 2022-06-27 11:21:41 -07:00
Chris Roberts
139349b136 Remove vagrantfiles from default arguments in call 2022-06-24 18:25:50 -07:00
Chris Roberts
fd963c39d4 Reuse cache and init after cloning 2022-06-21 14:43:14 -07:00
Chris Roberts
1bd6e4d946 Always init all known targets 2022-06-21 14:41:05 -07:00
Chris Roberts
2890fb57c5 Finalize the entire Vagrantfile so all config is properly available 2022-06-20 16:04:01 -07:00
Chris Roberts
97c51a56cd Reorganize vagrantfile implementation, support provider overrides 2022-06-20 13:02:01 -07:00
Chris Roberts
f50f700e5c Update machine to use vagrantfile for synced folders 2022-06-20 13:01:13 -07:00
Chris Roberts
3e783b6074 Fix up project vagrantfile usage and target init 2022-06-20 13:00:42 -07:00
Chris Roberts
f564592651 Update target to use vagrantfile 2022-06-20 13:00:02 -07:00
Chris Roberts
ec531c5ace Optimize target loading from index 2022-06-20 12:58:22 -07:00
Chris Roberts
92667df091 Add cleanup to factory and close registered basis when closed 2022-06-20 12:56:56 -07:00
Chris Roberts
16d4145091 Only store a project after it has been fully initialized 2022-06-20 12:56:10 -07:00
Chris Roberts
ab34fddbc4 Remove automatic target initialization, update caching 2022-06-15 11:15:08 -07:00
Chris Roberts
e03058d9e8 Fix up synced folder collection generation 2022-06-15 11:15:04 -07:00
Chris Roberts
a262686f08 Fix up string format types 2022-06-15 11:14:07 -07:00
Chris Roberts
18190aab38 Load location stringer update 2022-06-15 11:14:07 -07:00
Chris Roberts
7e387b6d10 Update core scopes to use Vagrantfile 2022-06-15 11:13:40 -07:00
Chris Roberts
3a2b8bd733 Generated load location stringer file 2022-06-15 11:08:08 -07:00
Chris Roberts
95b25bfa1c Add vagrantfile implementation 2022-06-15 11:08:08 -07:00
Paul Hinze
f2417e09a8
Merge pull request #284 from hashicorp/provider-options-bugfixes
Fix some bugs in provider options handling
2022-06-08 18:02:31 -05:00
Paul Hinze
71cc8ee7bb
Fix some bugs in provider options handling
- Defaultable needs to default to true when it's not specified
- We need to allow a non-defaultable provider to be selected if it shows
  up in the config
2022-06-08 17:25:16 -05:00
Paul Hinze
8b5d4b8631
Update and address protobuf package deprecations
These changes address the following warning showing up on `go get`
operations:

    go: module github.com/golang/protobuf is deprecated: Use the
    "google.golang.org/protobuf" module instead.

All changes are made using the recommendations in the per-function
deprecation notices from the docs at
https://pkg.go.dev/github.com/golang/protobuf/ptypes
2022-06-08 11:51:19 -05:00
Paul Hinze
8b08b3117c
Use plugin options for Synced Folder priorities
Now that plugin options are available, we can use them to interpret
synced folder priorities and remove the shim we had in place.
2022-06-06 17:39:09 -05:00
Paul Hinze
8dbe72a5a0
Use Component Options to implement ProviderOptions
* Populates ComponentOptions into plugin structs
* Maps options for legacy Provider Plugins into PluginOptions
* Demos use of PluginOptions in a stub provider
* Honors plugin priority and defaultable settings
2022-06-03 16:37:05 -05:00
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
25fcf61364
Sort synced folder plugins by priority and honor allowed setting
It turns out that synced folder plugins aren't returned in a consistent
order, which was causing all kinds of mayhem.

We can tone down that mayhem by implementing a shim of priority sorting
the plugins. This shim can be removed once we have proper priority
registration in the SDK.
2022-05-25 16:19:50 -05:00
Paul Hinze
88822f5a96
Override provider for all non-active targets
Instead of only targets with empty providers. This helps address a
problem that @soapy1 found in review where machines that failed to come
up would get stuck with the wrong provider.
2022-05-25 16:19:50 -05:00
Paul Hinze
823b6d366c
More conservative nil checking on WithProvider to prevent panics 2022-05-25 16:19:50 -05:00
sophia
8801e030b7
Get default synced folder type
(cherry picked from commit cd6baafb9238a58e992519e0576565d1a57bf8f5)
(but modified to work)
2022-05-25 16:19:50 -05:00