go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/swarming/server/testing/integrationmocks/server.proto (about)

     1  // Copyright 2023 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package swarming.integrationmocks;
    18  
    19  option go_package = "go.chromium.org/luci/swarming/server/testing/integrationmocks";
    20  
    21  import "go.chromium.org/luci/swarming/proto/internals/rbe.proto";
    22  
    23  
    24  // IntegrationMocks is called by local integration tests as replacement for
    25  // Swarming Python endpoints.
    26  //
    27  // IntegrationMocks is compiled into the main server binary, but it is exposed
    28  // only when the CLI flag `-expose-integration-mocks` is set (which happens in
    29  // integration tests).
    30  service IntegrationMocks {
    31    // GeneratePollToken produces a HMAC-tagged poll token.
    32    rpc GeneratePollToken(swarming.internals.rbe.PollState) returns (PollToken);
    33  }
    34  
    35  
    36  // PollToken carries HMAC-tagged poll token, as if it was returned by
    37  // Swarming Python's "/bot/poll" response.
    38  message PollToken {
    39    bytes poll_token = 1;
    40  }