isolatedfake

package
v0.0.0-...-a0a3655 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package isolatedfake implements an in-process fake Isolated server for integration testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsolatedFake

type IsolatedFake struct {
	http.ServeMux
	// contains filtered or unexported fields
}

IsolatedFake is a functional fake in-memory isolated server.

func New

func New() *IsolatedFake

New create a HTTP router that implements an isolated server.

func (*IsolatedFake) Contents

func (s *IsolatedFake) Contents() map[string]map[isolated.HexDigest][]byte

Contents returns all the uncompressed data on the fake isolated server, per namespace.

func (*IsolatedFake) Error

func (s *IsolatedFake) Error() error

Error returns any registered error.

It can either be due to a server side error (improper API use) or an error injected by fail().

func (*IsolatedFake) Inject

func (s *IsolatedFake) Inject(namespace string, data []byte) isolated.HexDigest

Inject adds uncompressed data in the fake isolated server.

Jump to

Keyboard shortcuts

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