fake

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeServer

type FakeServer struct {

	// Expected path to call, ignored when empty
	Path string
	// The http status code that will be returned
	StatusCode int
	// The expected group, ignored when empty
	Group string
	// The expected id, ignored when empty
	ID string
	// contains filtered or unexported fields
}

Fake server is a fake fleetlock server. It will always return the choosen http code and validate the request.

func NewFakeServer

func NewFakeServer(t *testing.T, statusCode int, path string) *FakeServer

Create a new fake server. Takes the testing variable, the http return code it should give and optional an expected path to call.

func (*FakeServer) Close

func (s *FakeServer) Close()

Close the server.

func (*FakeServer) URL

func (s *FakeServer) URL() string

Return the url the server is listening on

Jump to

Keyboard shortcuts

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