Documentation ¶
Overview ¶
Package integrationmocks exposes endpoints to simplify integration testing.
Exposed endpoints fake some of Swarming Python server logic, which allows running some integration tests entirely within luci-go repo.
Index ¶
- Constants
- Variables
- func FileDescriptorSet() *descriptorpb.FileDescriptorSet
- func RegisterIntegrationMocksServer(s grpc.ServiceRegistrar, srv IntegrationMocksServer)
- type IntegrationMocksClient
- type IntegrationMocksServer
- type PollToken
- type UnimplementedIntegrationMocksServer
- type UnsafeIntegrationMocksServer
Constants ¶
const (
IntegrationMocks_GeneratePollToken_FullMethodName = "/swarming.integrationmocks.IntegrationMocks/GeneratePollToken"
)
Variables ¶
var File_go_chromium_org_luci_swarming_server_testing_integrationmocks_server_proto protoreflect.FileDescriptor
var IntegrationMocks_ServiceDesc = grpc.ServiceDesc{ ServiceName: "swarming.integrationmocks.IntegrationMocks", HandlerType: (*IntegrationMocksServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GeneratePollToken", Handler: _IntegrationMocks_GeneratePollToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "go.chromium.org/luci/swarming/server/testing/integrationmocks/server.proto", }
IntegrationMocks_ServiceDesc is the grpc.ServiceDesc for IntegrationMocks service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptorpb.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func RegisterIntegrationMocksServer ¶
func RegisterIntegrationMocksServer(s grpc.ServiceRegistrar, srv IntegrationMocksServer)
Types ¶
type IntegrationMocksClient ¶
type IntegrationMocksClient interface { // GeneratePollToken produces a HMAC-tagged poll token. GeneratePollToken(ctx context.Context, in *internals.PollState, opts ...grpc.CallOption) (*PollToken, error) }
IntegrationMocksClient is the client API for IntegrationMocks service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewIntegrationMocksClient ¶
func NewIntegrationMocksClient(cc grpc.ClientConnInterface) IntegrationMocksClient
type IntegrationMocksServer ¶
type IntegrationMocksServer interface { // GeneratePollToken produces a HMAC-tagged poll token. GeneratePollToken(context.Context, *internals.PollState) (*PollToken, error) // contains filtered or unexported methods }
IntegrationMocksServer is the server API for IntegrationMocks service. All implementations must embed UnimplementedIntegrationMocksServer for forward compatibility
type PollToken ¶
type PollToken struct { PollToken []byte `protobuf:"bytes,1,opt,name=poll_token,json=pollToken,proto3" json:"poll_token,omitempty"` // contains filtered or unexported fields }
PollToken carries HMAC-tagged poll token, as if it was returned by Swarming Python's "/bot/poll" response.
func (*PollToken) Descriptor
deprecated
func (*PollToken) GetPollToken ¶
func (*PollToken) ProtoMessage ¶
func (*PollToken) ProtoMessage()
func (*PollToken) ProtoReflect ¶
func (x *PollToken) ProtoReflect() protoreflect.Message
type UnimplementedIntegrationMocksServer ¶
type UnimplementedIntegrationMocksServer struct { }
UnimplementedIntegrationMocksServer must be embedded to have forward compatible implementations.
func (UnimplementedIntegrationMocksServer) GeneratePollToken ¶
type UnsafeIntegrationMocksServer ¶
type UnsafeIntegrationMocksServer interface {
// contains filtered or unexported methods
}
UnsafeIntegrationMocksServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IntegrationMocksServer will result in compilation errors.