fleet/server/mdm/android/mock/proxy_setup.go
Victor Lyuboslavsky 3d9072981b
Delete Android PubSub topic when deleting enterprise. (#26676)
For #26218

This is a dev helper feature (since it will be implemented in
fleetdm.com). It fixes the issue of stale PubSub topics. Having stale
PubSub topics around may cause extra traffic/errors on dev server.

- [x] Manual QA for all new/changed functionality
2025-02-28 15:06:52 -06:00

23 lines
722 B
Go

package mock
import (
"context"
"github.com/fleetdm/fleet/v4/server/mdm/android"
"google.golang.org/api/androidmanagement/v1"
)
func (p *Proxy) InitCommonMocks() {
p.EnterpriseDeleteFunc = func(ctx context.Context, enterpriseID string) error {
return nil
}
p.SignupURLsCreateFunc = func(callbackURL string) (*android.SignupDetails, error) {
return &android.SignupDetails{}, nil
}
p.EnterprisesCreateFunc = func(ctx context.Context, req android.ProxyEnterprisesCreateRequest) (string, string, error) {
return "enterpriseName", "projects/project/topics/topic", nil
}
p.EnterprisesPoliciesPatchFunc = func(enterpriseID string, policyName string, policy *androidmanagement.Policy) error {
return nil
}
}