Set target uuid opposed to resource id
The uuid is the public identifier vs the resource id which should be for internal operations. The target uuid should correspond to the machine id (given by the provider)
This commit is contained in:
parent
90033b9b68
commit
9ea254735a
@ -244,7 +244,7 @@ func (m *Machine) SyncedFolders() (folders []*core.MachineSyncedFolder, err erro
|
||||
func (m *Machine) SaveMachine() (err error) {
|
||||
m.logger.Debug("saving machine to db", "machine", m.machine.Id)
|
||||
m.target.Record, err = ptypes.MarshalAny(m.machine)
|
||||
m.target.ResourceId = m.machine.Id
|
||||
m.target.Uuid = m.machine.Id
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ func TestMachineSetValidId(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Failed to get target")
|
||||
}
|
||||
require.Equal(t, dbTarget.Target.ResourceId, "something")
|
||||
require.Equal(t, dbTarget.Target.Uuid, "something")
|
||||
}
|
||||
|
||||
func TestMachineSetEmptyId(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user