Documentation
¶
Index ¶
- Constants
- func GetActualProtocFileDescriptorSet(t *testing.T, includeImports bool, includeSourceInfo bool, dirPath string, ...) *descriptorpb.FileDescriptorSet
- func GetGoogleapisDirPath(tb testing.TB, buftestingDirPath string) string
- func GetProtocFilePaths(t *testing.T, dirPath string, limit int) []string
- func GetProtocFilePathsErr(ctx context.Context, dirPath string, limit int) ([]string, error)
- func RunActualProtoc(t *testing.T, includeImports bool, includeSourceInfo bool, dirPath string, ...)
- func WKTOpener() source.Opener
Constants ¶
const ( // NumGoogleapisFiles is the number of googleapis files on the current test commit. NumGoogleapisFiles = 1574 // NumGoogleapisFilesWithImports is the number of googleapis files on the current test commit with imports. NumGoogleapisFilesWithImports = 1585 )
Variables ¶
This section is empty.
Functions ¶
func GetActualProtocFileDescriptorSet ¶
func GetActualProtocFileDescriptorSet( t *testing.T, includeImports bool, includeSourceInfo bool, dirPath string, filePaths []string, ) *descriptorpb.FileDescriptorSet
GetActualProtocFileDescriptorSet gets the FileDescriptorSet for actual protoc.
func GetGoogleapisDirPath ¶
GetGoogleapisDirPath gets the path to a clone of googleapis.
func GetProtocFilePaths ¶
GetProtocFilePaths gets the file paths for protoc.
Limit limits the number of files returned if > 0. protoc has a fixed size for number of characters to argument list.
func GetProtocFilePathsErr ¶
GetProtocFilePathsErr is like GetProtocFilePaths except it returns an error and accepts a ctx.
func RunActualProtoc ¶
func RunActualProtoc( t *testing.T, includeImports bool, includeSourceInfo bool, dirPath string, filePaths []string, env map[string]string, stdout io.Writer, extraFlags ...string, )
RunActualProtoc runs actual protoc.
func WKTOpener ¶ added in v1.71.0
WKTOpener returns a source.Opener backed by datawkt.ReadBucket. Tests that compile proto files referencing the well-known types — including the implicit descriptor.proto dependency requested by the experimental compiler — can chain this opener via source.Openers to provide WKT fallback resolution from the same in-process bucket production code uses.
Types ¶
This section is empty.