package host import ( "context" "errors" "github.com/carlosframework/platform/internal/activator" "github.com/carlosframework/platform/internal/hostbox" ) type fakeLaunchRoot struct { protocol string err error } func (f fakeLaunchRoot) Capability(context.Context) (string, error) { return f.protocol, f.err } func (fakeLaunchRoot) Launch(context.Context, hostbox.RoleLaunchRequest) (hostbox.RoleLaunchGrant, error) { return hostbox.RoleLaunchGrant{}, errors.New("unused") } func (fakeLaunchRoot) Stop(context.Context, hostbox.RoleLaunchRequest) error { return nil } func (f fakeLaunchRoot) KindCapability(context.Context, string) error { if f.protocol != hostbox.RoleLaunchProtocol { return activator.ErrClaimIsolationUnavailable } return f.err }