Skip to content

Commit c867293

Browse files
committed
internal/target: Update mocks
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
1 parent af218f1 commit c867293

3 files changed

Lines changed: 120 additions & 5 deletions

File tree

cmd/migration-managerd/internal/api/migration_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,11 @@ def placement(instance, batch):
653653
tgt := target.InternalIncusTarget{InternalTarget: target.NewInternalTarget(t, "6.0")}
654654
return tgt.CreateVMDefinition(instanceDef, usedNetworks, q, fingerprint, endpoint, targeNetwork)
655655
},
656-
CreateNewVMFunc: func(ctx context.Context, instDef migration.Instance, apiDef incusAPI.InstancesPost, placement api.Placement, bootISOImage string) (func(), error) {
657-
return func() { ranCleanup = true }, nil
656+
CreateNewVMFunc: func(ctx context.Context, instDef migration.Instance, apiDef incusAPI.InstancesPost, placement api.Placement, bootISOImage string) (func(context.Context) error, func(), error) {
657+
return func(_ context.Context) error { return nil }, func() { ranCleanup = true }, nil
658+
},
659+
SetupVMFunc: func(ctx context.Context, instDef migration.Instance, apiDef incusAPI.InstancesPost, placement api.Placement) error {
660+
return nil
658661
},
659662
GetDetailsFunc: func(ctx context.Context) (*target.IncusDetails, error) {
660663
for _, tgt := range tc.targetDetails {

internal/source/mock_gen.go

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/target/mock_gen.go

Lines changed: 65 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)