package buffer_test

import (
	remoteexecution "github.com/bazelbuild/remote-apis/build/bazel/remote/execution/v2"
	"github.com/buildbarn/bb-storage/pkg/digest"
)

var (
	// An example ActionResult message that are used in a variety of
	// the unit tests.
	exampleActionResultMessage = remoteexecution.ActionResult{
		OutputFiles: []*remoteexecution.OutputFile{
			{
				Path: "bazel-out/k8-fastbuild/bin/packages/epstopdf-base_test.pdf",
				Digest: &remoteexecution.Digest{
					Hash:      "38cadb06fb6e4ae5d0bae39e0b8a8f0c14086c35ac2eb1e144f97fc4745a5386",
					SizeBytes: 4868,
				},
			},
		},
	}
	exampleActionResultBytes = []byte{
		0x12, 0x83, 0x01, 0x0a, 0x3a, 0x62, 0x61, 0x7a,
		0x65, 0x6c, 0x2d, 0x6f, 0x75, 0x74, 0x2f, 0x6b,
		0x38, 0x2d, 0x66, 0x61, 0x73, 0x74, 0x62, 0x75,
		0x69, 0x6c, 0x64, 0x2f, 0x62, 0x69, 0x6e, 0x2f,
		0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73,
		0x2f, 0x65, 0x70, 0x73, 0x74, 0x6f, 0x70, 0x64,
		0x66, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74,
		0x65, 0x73, 0x74, 0x2e, 0x70, 0x64, 0x66, 0x12,
		0x45, 0x0a, 0x40, 0x33, 0x38, 0x63, 0x61, 0x64,
		0x62, 0x30, 0x36, 0x66, 0x62, 0x36, 0x65, 0x34,
		0x61, 0x65, 0x35, 0x64, 0x30, 0x62, 0x61, 0x65,
		0x33, 0x39, 0x65, 0x30, 0x62, 0x38, 0x61, 0x38,
		0x66, 0x30, 0x63, 0x31, 0x34, 0x30, 0x38, 0x36,
		0x63, 0x33, 0x35, 0x61, 0x63, 0x32, 0x65, 0x62,
		0x31, 0x65, 0x31, 0x34, 0x34, 0x66, 0x39, 0x37,
		0x66, 0x63, 0x34, 0x37, 0x34, 0x35, 0x61, 0x35,
		0x33, 0x38, 0x36, 0x10, 0x84, 0x26,
	}
	exampleActionResultDigest = digest.MustNewDigest(
		"qux",
		remoteexecution.DigestFunction_MD5,
		"d555bf579673a15bb6301f4b2f0593a8",
		134)

	exampleDigest = digest.MustNewDigest(
		"hello",
		remoteexecution.DigestFunction_MD5,
		"d41d8cd98f00b204e9800998ecf8427e",
		123)
)
