testutil

package
v0.0.0-...-86906c4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEvents

func CheckEvents(t *testing.T, wantEvents, gotEvents []event.Event) bool

Types

type EventLog

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

func NewEventLog

func NewEventLog(broker event.Broker) *EventLog

func (*EventLog) Check

func (e *EventLog) Check(t *testing.T) bool

func (*EventLog) Expect

func (e *EventLog) Expect(evt event.Event)

type PasswordHasher

type PasswordHasher struct{}

func NewPasswordHasher

func NewPasswordHasher() *PasswordHasher

func (*PasswordHasher) CheckDummyPasswordHash

func (h *PasswordHasher) CheckDummyPasswordHash() error

func (*PasswordHasher) CheckPasswordHash

func (h *PasswordHasher) CheckPasswordHash(password, encodedHash []byte) (bool, bool, error)

func (*PasswordHasher) EncodedPasswordHash

func (h *PasswordHasher) EncodedPasswordHash(password []byte) ([]byte, error)

type Server

type Server struct {
	*httptest.Server
}

func NewServer

func NewServer(t *testing.T, handler http.Handler) *Server

func (*Server) FindCookie

func (s *Server) FindCookie(t *testing.T, cookiesURL, name string) *http.Cookie

Jump to

Keyboard shortcuts

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