cherry-pick: fix some issues with teams and self-service android apps #37062 (#37362)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36807 

cherry-pick for https://github.com/fleetdm/fleet/pull/37062
This commit is contained in:
Jahziel Villasana-Espinoza
2025-12-17 11:44:25 -05:00
committed by GitHub
parent 8e589f8ee6
commit 63fc8a3da5
11 changed files with 284 additions and 14 deletions
+3
View File
@@ -67,6 +67,9 @@ func TestHostsTransferByHosts(t *testing.T) {
ds.ListHostsLiteByIDsFunc = func(ctx context.Context, ids []uint) ([]*fleet.Host, error) {
return nil, nil
}
ds.ListMDMAndroidUUIDsToHostIDsFunc = func(ctx context.Context, hostIDs []uint) (map[string]uint, error) {
return map[string]uint{}, nil
}
assert.Equal(t, "", RunAppForTest(t, []string{"hosts", "transfer", "--team", "team1", "--hosts", "host1"}))
assert.True(t, ds.AddHostsToTeamFuncInvoked)