MCPcopy Index your code
hub / github.com/cloudfoundry/cli / expectFileContentsToEqual

Function expectFileContentsToEqual

actor/sharedaction/resource_test.go:426–435  ·  view source on GitHub ↗
(file *zip.File, expectedContents string)

Source from the content-addressed store, hash-verified

424})
425
426func expectFileContentsToEqual(file *zip.File, expectedContents string) {
427 reader, err := file.Open()
428 Expect(err).ToNot(HaveOccurred())
429 defer reader.Close()
430
431 body, err := io.ReadAll(reader)
432 Expect(err).ToNot(HaveOccurred())
433
434 Expect(string(body)).To(Equal(expectedContents))
435}

Callers 1

resource_test.goFile · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected