diff --git a/internal/core/machine_test.go b/internal/core/machine_test.go index b64ce6b0f..edec3d871 100644 --- a/internal/core/machine_test.go +++ b/internal/core/machine_test.go @@ -242,7 +242,7 @@ func TestMachineSyncedFolders(t *testing.T) { errors: false, config: &vagrant_plugin_sdk.Vagrantfile_ConfigVM{ SyncedFolders: []*vagrant_plugin_sdk.Vagrantfile_SyncedFolder{ - {Source: ".", Destination: "/vagrant", Type: "mysyncedfolder"}, + {Source: ".", Destination: "/vagrant", Type: stringPtr("mysyncedfolder")}, }, }, expectedFolders: 1, @@ -253,9 +253,9 @@ func TestMachineSyncedFolders(t *testing.T) { errors: false, config: &vagrant_plugin_sdk.Vagrantfile_ConfigVM{ SyncedFolders: []*vagrant_plugin_sdk.Vagrantfile_SyncedFolder{ - {Source: ".", Destination: "/vagrant", Type: "mysyncedfolder"}, - {Source: "./two", Destination: "/vagrant-two", Type: "mysyncedfolder"}, - {Source: "./three", Destination: "/vagrant-three", Type: "myothersyncedfolder"}, + {Source: ".", Destination: "/vagrant", Type: stringPtr("mysyncedfolder")}, + {Source: "./two", Destination: "/vagrant-two", Type: stringPtr("mysyncedfolder")}, + {Source: "./three", Destination: "/vagrant-three", Type: stringPtr("myothersyncedfolder")}, }, }, expectedFolders: 3, @@ -266,9 +266,9 @@ func TestMachineSyncedFolders(t *testing.T) { errors: true, config: &vagrant_plugin_sdk.Vagrantfile_ConfigVM{ SyncedFolders: []*vagrant_plugin_sdk.Vagrantfile_SyncedFolder{ - {Source: ".", Destination: "/vagrant", Type: "idontexist"}, - {Source: "./two", Destination: "/vagrant-two", Type: "mysyncedfolder"}, - {Source: "./three", Destination: "/vagrant-three", Type: "myothersyncedfolder"}, + {Source: ".", Destination: "/vagrant", Type: stringPtr("idontexist")}, + {Source: "./two", Destination: "/vagrant-two", Type: stringPtr("mysyncedfolder")}, + {Source: "./three", Destination: "/vagrant-three", Type: stringPtr("myothersyncedfolder")}, }, }, }, @@ -290,3 +290,7 @@ func TestMachineSyncedFolders(t *testing.T) { } } } + +func stringPtr(s string) *string { + return &s +}