keploy

package
v2.0.0-alpha8 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GracefulShutdown

func GracefulShutdown()

GracefulShutdown is used to signal the user application to exit when SIGTERM is triggered from keploy test cmd. This function call can be used when the go application have not employed a graceful shutdown mechanism.

func KillProcessOnPort

func KillProcessOnPort()

func New

func New(conf Config) error

Types

type Config

type Config struct {
	Mode           Mode   // Keploy mode on which unit test will run. Possible values: MODE_TEST or MODE_RECORD. Default: MODE_TEST
	Name           string // Name to record the mock or test the mocks
	Path           string // Path in which Keploy "/mocks" will be generated. Default: current working directroy.
	MuteKeployLogs bool
	Delay          int
}

type Mode

type Mode string

Mode represents the mode at which the SDK is operating MODE_RECORD is for recording API calls to generate testcases MODE_TEST is for testing the application on previous recorded testcases MODE_OFF disables keploy SDK automatically from the application

const (
	MODE_RECORD Mode = "record"
	MODE_TEST   Mode = "test"
	MODE_OFF    Mode = "off"
)

func (Mode) Valid

func (m Mode) Valid() bool

Valid checks if the provided mode is valid

Jump to

Keyboard shortcuts

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