sit

package module
v0.0.0-...-435ebe7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 4 Imported by: 0

README

Service Isolation Test

build Go Report Card

A service-isolation-test library built in Golang

Dependencies

  • Wiremock running at port 8080
    docker run -it --rm -p 8080:8080 wiremock/wiremock
    
  • Install gotestsum
    go install gotest.tools/gotestsum@latest
    
  • Running unit tests
    make test
    

Documentation

🚧 WIP

Example

🚧 WIP

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SIT

type SIT struct {
	T *testing.T
	// contains filtered or unexported fields
}

func NewSIT

func NewSIT(t *testing.T, url string) *SIT

func (*SIT) AssertFloatEqualInJSONPath

func (s *SIT) AssertFloatEqualInJSONPath(path, json string, expected float64)

func (*SIT) AssertIntEqualInJSONPath

func (s *SIT) AssertIntEqualInJSONPath(path, json string, expected int64)

func (*SIT) AssertStringEqualInJSONPath

func (s *SIT) AssertStringEqualInJSONPath(path, json, expected string)

func (*SIT) Reset

func (s *SIT) Reset() error

func (*SIT) StubFor

func (s *SIT) StubFor(method, path string, option *StubOption)

type StubOption

type StubOption struct {
	// contains filtered or unexported fields
}

func NewStubOption

func NewStubOption() *StubOption

func (*StubOption) WillReturnJSON

func (s *StubOption) WillReturnJSON(value interface{}, headers map[string]string, status int64) *StubOption

func (*StubOption) WithEquaJSONlBody

func (s *StubOption) WithEquaJSONlBody(value string) *StubOption

func (*StubOption) WithEqualHeader

func (s *StubOption) WithEqualHeader(key, value string) *StubOption

func (*StubOption) WithEqualQueryParam

func (s *StubOption) WithEqualQueryParam(key, value string) *StubOption

Jump to

Keyboard shortcuts

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