Testing guest detection

This commit is contained in:
sophia 2022-02-22 16:05:29 -06:00 committed by Paul Hinze
parent 70d0d4dfb8
commit 1cfbea7437
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -69,3 +69,15 @@ func TestMachineSetEmptyId(t *testing.T) {
require.Nil(t, dbTarget)
require.Error(t, err)
}
func TestMachineConfigedGuest(t *testing.T) {
tm, _ := TestMachine(t,
WithTestTargetConfig(&vagrant_plugin_sdk.Vagrantfile_MachineConfig{
ConfigVm: &vagrant_plugin_sdk.Vagrantfile_ConfigVM{Guest: "myguest"},
}),
)
guest, err := tm.Guest()
require.NoError(t, err)
require.NotNil(t, guest)
require.NotNil(t, tm.guest)
}