MCPcopy Create free account
hub / github.com/UiPath/uipathcli / TestFileStreamFileNotFound

Function TestFileStreamFileNotFound

utils/stream/file_stream_test.go:56–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestFileStreamFileNotFound(t *testing.T) {
57 stream := NewFileStream("unknown-path/my-file.txt")
58
59 _, err := stream.Data()
60
61 if err.Error() != "File 'unknown-path/my-file.txt' not found" {
62 t.Errorf("Should return file not found error, but got: %v", err)
63 }
64}
65
66func createFile(t *testing.T, name string, content string) string {
67 path := filepath.Join(t.TempDir(), name)

Callers

nothing calls this directly

Calls 3

DataMethod · 0.95
NewFileStreamFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected