integration

package
v1.66.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-3-Clause Imports: 66 Imported by: 4

Documentation

Overview

Package integration contains Tailscale integration tests.

This package is considered internal and the public API is subject to change without notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryDir added in v1.20.0

func BinaryDir(tb testing.TB) string

BinaryDir returns a directory containing test tailscale and tailscaled binaries. If any test calls BinaryDir, there must be a TestMain function that calls CleanupBinaries after all tests are complete.

func CleanupBinaries added in v1.20.0

func CleanupBinaries()

CleanupBinaries cleans up any resources created by calls to BinaryDir, TailscaleBinary, or TailscaledBinary. It should be called from TestMain after all tests have completed.

func RunDERPAndSTUN added in v1.12.0

func RunDERPAndSTUN(t testing.TB, logf logger.Logf, ipAddress string) (derpMap *tailcfg.DERPMap)

RunDERPAndSTUN runs a local DERP and STUN server for tests, returning the derpMap that clients should use. This creates resources that must be cleaned up with the returned cleanup function.

func TailscaleBinary added in v1.20.0

func TailscaleBinary(tb testing.TB) string

TailscaleBinary returns the path to the test tailscale binary. If any test calls TailscaleBinary, there must be a TestMain function that calls CleanupBinaries after all tests are complete.

func TailscaledBinary added in v1.20.0

func TailscaledBinary(tb testing.TB) string

TailscaledBinary returns the path to the test tailscaled binary. If any test calls TailscaleBinary, there must be a TestMain function that calls CleanupBinaries after all tests are complete.

Types

type LogCatcher added in v1.12.0

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

LogCatcher is a minimal logcatcher for the logtail upload client.

func (*LogCatcher) Reset added in v1.12.0

func (lc *LogCatcher) Reset()

Reset clears the buffered logs from memory.

func (*LogCatcher) ServeHTTP added in v1.12.0

func (lc *LogCatcher) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*LogCatcher) StoreRawJSON added in v1.22.0

func (lc *LogCatcher) StoreRawJSON()

StoreRawJSON instructs lc to save the raw JSON uploads, rather than just the text.

func (*LogCatcher) UseLogf added in v1.12.0

func (lc *LogCatcher) UseLogf(fn logger.Logf)

UseLogf makes the logcatcher implementation use a given logf function to dump all logs to.

Directories

Path Synopsis
Package testcontrol contains a minimal control plane server for testing purposes.
Package testcontrol contains a minimal control plane server for testing purposes.
vms
Package vms does VM-based integration/functional tests by using qemu and a bank of pre-made VM images.
Package vms does VM-based integration/functional tests by using qemu and a bank of pre-made VM images.
gen

Jump to

Keyboard shortcuts

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