...

Package testing

import "cloud.google.com/go/logging/internal/testing"
Overview
Index

Overview ▾

Package testing provides support for testing the logging client.

Constants

The only IDs that WriteLogEntries will accept. Important for testing Ping.

const (
    ValidProjectID = "PROJECT_ID"
    ValidOrgID     = "433637338589"

    SharedServiceAccount = "serviceAccount:cloud-logs@system.gserviceaccount.com"
)

func NewServer

func NewServer() (string, error)

NewServer creates a new in-memory fake server implementing the logging service. It returns the address of the server.

func PayloadEqual

func PayloadEqual(a, b interface{}) bool

PayloadEqual compares two payloads, assuming they are both proto.Messages or both strings.