internal

package
v2.6.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package internal contains utilities for running integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey() (string, error)

APIKey fetches a Firebase API key for integration tests.

APIKey reads the API key string from a file named integration_apikey.txt in the testdata directory.

func NewHTTPClient

func NewHTTPClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, error)

NewHTTPClient creates an HTTP client for making authorized requests during tests.

func NewTestApp

func NewTestApp(ctx context.Context, conf *firebase.Config) (*firebase.App, error)

NewTestApp creates a new App instance for integration tests.

NewTestApp looks for a service account JSON file named integration_cert.json in the testdata directory. This file is used to initialize the newly created App instance.

func ProjectID

func ProjectID() (string, error)

ProjectID fetches a Google Cloud project ID for integration tests.

func Resource added in v1.0.2

func Resource(name string) string

Resource returns the absolute path to the specified test resource file.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL