Google Cloud Spanner C++ Client
A C++ Client Library for Google Cloud Spanner
|
An inlined, versioned namespace for the testing helpers. More...
Classes | |
class | DatabaseEnvironment |
class | MockDatabaseAdminStub |
class | MockInstanceAdminStub |
class | MockSpannerStub |
Functions | |
MATCHER_P (IsProtoEqual, value, "") | |
MATCHER_P2 (HasSessionAndTransactionId, session_id, transaction_id, "Verifies a Transaction has the expected Session and Transaction IDs") | |
Verifies a Transaction has the expected Session and Transaction IDs. More... | |
std::string | RandomDatabaseName (google::cloud::internal::DefaultPRNG &generator) |
Create a random database name given a PRNG generator. More... | |
Status | IsContextMDValid (grpc::ClientContext &context, std::string const &method, std::string const &api_client_header) |
Verify that the metadata in the context is appropriate for a gRPC method. More... | |
An inlined, versioned namespace for the testing helpers.
Status google::cloud::spanner_testing::v0::IsContextMDValid | ( | grpc::ClientContext & | context, |
std::string const & | method, | ||
std::string const & | api_client_header | ||
) |
Verify that the metadata in the context is appropriate for a gRPC method.
ClientContext
should instruct gRPC to set a x-goog-request-params
HTTP header with a value dictated by a google.api.http
option in the gRPC service specification. This function checks if the header is set and whether it has a valid value.
context | the context to validate |
method | a gRPC method which which this context will be passed to |
api_client_header | expected value for the x-goog-api-client metadata header. |
context
will be destroyed and shouldn't be used after passing it to this function.context
is properly set up Definition at line 37 of file validate_metadata.cc.
google::cloud::spanner_testing::v0::MATCHER_P | ( | IsProtoEqual | , |
value | , | ||
"" | |||
) |
Definition at line 30 of file matchers.h.
google::cloud::spanner_testing::v0::MATCHER_P2 | ( | HasSessionAndTransactionId | , |
session_id | , | ||
transaction_id | , | ||
"Verifies a Transaction has the expected Session and Transaction IDs" | |||
) |
Verifies a Transaction
has the expected Session and Transaction IDs.
Definition at line 40 of file matchers.h.
std::string google::cloud::spanner_testing::v0::RandomDatabaseName | ( | google::cloud::internal::DefaultPRNG & | generator | ) |
Create a random database name given a PRNG generator.
Definition at line 21 of file random_database_name.cc.