filetest

package
v0.0.0-...-ba09d25 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0, MIT 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.FileNoopRelease          `state:"nosave"`
	fsutil.FilePipeSeek             `state:"nosave"`
	fsutil.FileNotDirReaddir        `state:"nosave"`
	fsutil.FileNoFsync              `state:"nosave"`
	fsutil.FileNoopFlush            `state:"nosave"`
	fsutil.FileNoMMap               `state:"nosave"`
	fsutil.FileNoIoctl              `state:"nosave"`
	fsutil.FileNoSplice             `state:"nosave"`
	fsutil.FileUseInodeUnstableAttr `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