hooktest

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*httptest.Server
	LastBody []byte
}

func NewServer

func NewServer() *Server

NewServer returns a new webhook server for testing.

func (*Server) AssertTransientPayload

func (s *Server) AssertTransientPayload(t *testing.T, expected string)

func (*Server) HookConfig

func (s *Server) HookConfig() config.SelfServiceHook

HookConfig returns the hook configuration for calling the webhook server.

func (*Server) SetConfig

func (s *Server) SetConfig(t *testing.T, conf *configx.Provider, key string)

SetConfig adds the webhook to the list of hooks for the given key and restores the original configuration after the test.

Jump to

Keyboard shortcuts

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