Documentation
¶
Index ¶
- Variables
- func FakeGCPCredentials(ctx context.Context) (*google.Credentials, error)
- func FakeGCPDefaultCredentials(t *testing.T) func()
- func NewAWSSession(t *testing.T, region string) (sess *session.Session, rt http.RoundTripper, cleanup func())
- func NewAWSSession2(ctx context.Context, t *testing.T, region string) (sess *session.Session, rt http.RoundTripper, cleanup func())
- func NewAzureKeyVaultTestClient(ctx context.Context, t *testing.T) (func(), *http.Client)
- func NewAzureTestPipeline(ctx context.Context, t *testing.T, api string, credential azblob.Credential, ...) (pipeline.Pipeline, func(), *http.Client)
- func NewGCPClient(ctx context.Context, t *testing.T) (client *gcp.HTTPClient, rt http.RoundTripper, done func())
- func NewGCPgRPCConn(ctx context.Context, t *testing.T, endPoint, api string) (*grpc.ClientConn, func())
Constants ¶
This section is empty.
Variables ¶
var Record = flag.Bool("record", false, "whether to run tests against cloud resources and record the interactions")
Record is true iff the tests are being run in "record" mode.
Functions ¶
func FakeGCPCredentials ¶ added in v0.10.0
func FakeGCPCredentials(ctx context.Context) (*google.Credentials, error)
FakeGCPCredentials gets fake GCP credentials.
func FakeGCPDefaultCredentials ¶ added in v0.12.0
FakeGCPDefaultCredentials sets up the environment with fake GCP credentials. It returns a cleanup function.
func NewAWSSession ¶
func NewAWSSession(t *testing.T, region string) (sess *session.Session, rt http.RoundTripper, cleanup func())
NewAWSSession creates a new session for testing against AWS. If the test is in --record mode, the test will call out to AWS, and the results are recorded in a replay file. Otherwise, the session reads a replay file and runs the test as a replay, which never makes an outgoing HTTP call and uses fake credentials.
func NewAWSSession2 ¶ added in v0.11.0
func NewAWSSession2(ctx context.Context, t *testing.T, region string) (sess *session.Session, rt http.RoundTripper, cleanup func())
NewAWSSession2 is like NewAWSSession, but it uses a different record/replay proxy.
func NewAzureKeyVaultTestClient ¶ added in v0.12.0
NewAzureKeyVaultTestClient creates a *http.Client for Azure KeyVault test recordings.
func NewAzureTestPipeline ¶ added in v0.9.0
func NewAzureTestPipeline(ctx context.Context, t *testing.T, api string, credential azblob.Credential, accountName string) (pipeline.Pipeline, func(), *http.Client)
NewAzureTestPipeline creates a new connection for testing against Azure Blob.
func NewGCPClient ¶
func NewGCPClient(ctx context.Context, t *testing.T) (client *gcp.HTTPClient, rt http.RoundTripper, done func())
NewGCPClient creates a new HTTPClient for testing against GCP. If the test is in --record mode, the client will call out to GCP, and the results are recorded in a replay file. Otherwise, the session reads a replay file and runs the test as a replay, which never makes an outgoing HTTP call and uses fake credentials.
func NewGCPgRPCConn ¶
func NewGCPgRPCConn(ctx context.Context, t *testing.T, endPoint, api string) (*grpc.ClientConn, func())
NewGCPgRPCConn creates a new connection for testing against GCP via gRPC. If the test is in --record mode, the client will call out to GCP, and the results are recorded in a replay file. Otherwise, the session reads a replay file and runs the test as a replay, which never makes an outgoing RPC and uses fake credentials.
Types ¶
This section is empty.