MCPcopy
hub / github.com/bitfield/script / TestSHA256Sum_ReturnsErrorGivenReadErrorOnPipe

Function TestSHA256Sum_ReturnsErrorGivenReadErrorOnPipe

script_test.go:1605–1612  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1603}
1604
1605func TestSHA256Sum_ReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1606 t.Parallel()
1607 brokenReader := iotest.ErrReader(errors.New("oh no"))
1608 _, err := script.NewPipe().WithReader(brokenReader).SHA256Sum()
1609 if err == nil {
1610 t.Fatal(nil)
1611 }
1612}
1613
1614func TestSliceSink_ReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1615 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewPipeFunction · 0.92
SHA256SumMethod · 0.80
WithReaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…