Skip to content

Commit

Permalink
add missing mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
roperzh committed Jun 13, 2024
1 parent 8b344e3 commit e3b5ef2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/fleetctl/mdm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,9 @@ func TestMDMWipeCommand(t *testing.T) {
return nil, nil
}
}
ds.IsHostConnectedToFleetMDMFunc = func(ctx context.Context, host *fleet.Host) (bool, error) {
return host.MDM.ConnectedToFleet != nil && *host.MDM.ConnectedToFleet, nil
}

appCfgAllMDM, appCfgWinMDM, appCfgMacMDM, appCfgNoMDM := setupAppConigs()
appCfgScriptsDisabled := &fleet.AppConfig{ServerSettings: fleet.ServerSettings{ScriptsDisabled: true}}
Expand Down
3 changes: 3 additions & 0 deletions server/service/hosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,9 @@ func TestLockUnlockWipeHostAuth(t *testing.T) {
ds.UnlockHostManuallyFunc = func(ctx context.Context, hostID uint, platform string, ts time.Time) error {
return nil
}
ds.IsHostConnectedToFleetMDMFunc = func(ctx context.Context, host *fleet.Host) (bool, error) {
return true, nil
}

cases := []struct {
name string
Expand Down

0 comments on commit e3b5ef2

Please sign in to comment.