testfilestorage

package
v0.0.0-...-4cce589 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testfilestorage contains helpers to help testing a filestorage implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StorageHappyPathTest

func StorageHappyPathTest(t *testing.T, storage filestorage.FileStorage, callbacks *StorageHappyPathTestCallbacks)

StorageHappyPathTest is a helper to test the happy path of FileStorage

func StorageUnexistingReadTest

func StorageUnexistingReadTest(t *testing.T, storage filestorage.FileStorage)

StorageUnexistingReadTest tests that

Types

type StorageHappyPathTestCallbacks

type StorageHappyPathTestCallbacks struct {
	ValidateURL              func(*testing.T, string)
	StillExistsAfterDeletion func(*testing.T, string)
}

StorageHappyPathTestCallbacks is a structure to overide/skip certain test It's useful when a specific provider react differently than the expected behavior (like deleted file on Cloudinary that are still available for a few hours)

Jump to

Keyboard shortcuts

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