filetest

package
v0.0.0-...-23e6066 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package filetest provides a test implementation of an fs.File.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestFile

func NewTestFile(tb testing.TB) *fs.File

NewTestFile creates and initializes a new test file.

Types

type TestFileOperations

type TestFileOperations struct {
	fsutil.NoopRelease   `state:"nosave"`
	fsutil.PipeSeek      `state:"nosave"`
	fsutil.NotDirReaddir `state:"nosave"`
	fsutil.NoFsync       `state:"nosave"`
	fsutil.NoopFlush     `state:"nosave"`
	fsutil.NoMMap        `state:"nosave"`
	fsutil.NoIoctl       `state:"nosave"`
	waiter.AlwaysReady   `state:"nosave"`
}

TestFileOperations is an implementation of the File interface. It provides all required methods.

func (*TestFileOperations) Read

Read just fails the request.

func (*TestFileOperations) Write

Write just fails the request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL