buftesting

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package buftesting provides helpers for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffImagesJSON

func DiffImagesJSON(one bufpb.Image, two bufpb.Image, name string) (string, error)

DiffImagesJSON diffs the two Images using jsonpb.

func DiffImagesText

func DiffImagesText(one bufpb.Image, two bufpb.Image, name string) (string, error)

DiffImagesText diffs the two Images using proto.MarshalText.

func GetGithubArchive

func GetGithubArchive(
	ctx context.Context,
	outputDirPath string,
	owner string,
	repository string,
	ref string,
) error

GetGithubArchive gets the GitHub archive and untars it to the output directory path.

The root directory within the tarball is stripped. If the directory already exists, this is a no-op.

func GetProtocImage

func GetProtocImage(
	ctx context.Context,
	roots []string,
	realFilePaths []string,
	includeImports bool,
	includeSourceInfo bool,
) (bufpb.Image, error)

GetProtocImage gets the Image for the realFilePaths using protoc and wkt's on the current PATH.

func ImagesEqual

func ImagesEqual(one bufpb.Image, two bufpb.Image) (bool, error)

ImagesEqual checks if the images are equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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