dnscrypttest

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Unlicense Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dnscrypttest contains common testing constants and utilities.

Index

Constants

View Source
const (
	// Timeout is a common timeout for tests.
	Timeout = time.Second

	// TTL is a common DNS record TTL value that is used for testing.
	TTL = 5 * time.Minute

	// Hostname is a common hostname for tests.
	Hostname = "test.example"

	// FQDN is a common FQDN value for tests.  It is FQDN for [Hostname].
	FQDN = Hostname + "."
)

Variables

View Source
var (
	// Logger is a common logger for tests.
	Logger = slogutil.NewDiscardLogger()

	// testIPv4 is a common IPv4 address that is used for testing.
	IPv4 = netip.MustParseAddr("192.0.2.0")
)

Functions

func AssertDefaultDNSMessageResponse

func AssertDefaultDNSMessageResponse(tb testing.TB, reply *dns.Msg)

AssertDefaultDNSMessageResponse is a helper that verifies that the reply matches the default expectations.

func NewDNSMessage

func NewDNSMessage() (msg *dns.Msg)

NewDNSMessage is a helper that returns DNS message with default parameters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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