Fix unit tests
The type needs a string pointer now. We may end up wanting a string pointer making convenience method in the SDK at some point, but for now I punted on that question and just made one for the test.
This commit is contained in:
parent
e3444f40bc
commit
4b0acfb513
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user