tests

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCertificate

func GenerateCertificate(clientAuth bool, certOut, privOut io.Writer) ([]byte, []byte, error)

Types

type MainFunc

type MainFunc func()

type MainSupervisor

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

func NewMainSupervisor

func NewMainSupervisor(t *testing.T, main MainFunc) *MainSupervisor

Will init a new supervisor to execute the main function without crashing the current program. It HAVE to be called in at the very start of the test!

func (*MainSupervisor) Close

func (m *MainSupervisor) Close()

func (*MainSupervisor) Run

func (m *MainSupervisor) Run(config map[string]string) (string, bool, error)

type SyncedUint

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

func NewSyncedUint

func NewSyncedUint() *SyncedUint

func NewSyncedUintFrom

func NewSyncedUintFrom(val uint) *SyncedUint

func (*SyncedUint) GetInc

func (s *SyncedUint) GetInc() uint

type TlsServerCounter

type TlsServerCounter struct {
	CertServerFilePath string
	KeyServerFilePath  string
	CertClientFilePath string
	KeyClientFilePath  string

	ClientKeyPair tls.Certificate
	ServerKeyPair tls.Certificate
	// contains filtered or unexported fields
}

func NewStartedTlsServerCounter

func NewStartedTlsServerCounter(httpMode bool) (*TlsServerCounter, error)

*

  • Creates and a start a TLS server returning the "index" of the request as a body response.
  • It also generate a random and temporary certs and keys.

func (*TlsServerCounter) AddrPort

func (srv *TlsServerCounter) AddrPort() netip.AddrPort

func (*TlsServerCounter) AddrString

func (srv *TlsServerCounter) AddrString() string

func (*TlsServerCounter) Backend

func (srv *TlsServerCounter) Backend() string

func (*TlsServerCounter) Mode

func (srv *TlsServerCounter) Mode() string

func (*TlsServerCounter) TcpAddr

func (srv *TlsServerCounter) TcpAddr() *net.TCPAddr

Jump to

Keyboard shortcuts

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