MCPcopy
hub / github.com/grpc/grpc-go / loadFileBytes

Function loadFileBytes

internal/credentials/spiffe/spiffe_test.go:35–41  ·  view source on GitHub ↗
(t *testing.T, filePath string)

Source from the content-addressed store, hash-verified

33const wantURI = "spiffe://foo.bar.com/client/workload/1"
34
35func loadFileBytes(t *testing.T, filePath string) []byte {
36 bytes, err := os.ReadFile(filePath)
37 if err != nil {
38 t.Fatalf("Error reading file: %v", err)
39 }
40 return bytes
41}
42
43func TestKnownSPIFFEBundle(t *testing.T) {
44 spiffeBundleFile := testdata.Path("spiffe/spiffebundle.json")

Calls 1

FatalfMethod · 0.65

Tested by

no test coverage detected