testing

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testing provides helpers for testing SpliceD.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrReuse is returned if a host cannot be joined again due to reuse being disabled
	ErrReuse = errors.New("reuse disabled and host already exists")

	// SuccessBlob is returned for a successful join, in lieu of a real metadata blob.
	SuccessBlob = []byte("good job!")
)

Functions

This section is empty.

Types

type InactiveDirectory

type InactiveDirectory struct {
	Computers map[string]bool
}

InactiveDirectory provides a fake AD structure for testing

func NewInactiveDirectory

func NewInactiveDirectory() *InactiveDirectory

NewInactiveDirectory returns a new InactiveDirectory instance for testing.

func (*InactiveDirectory) Join

func (id *InactiveDirectory) Join(name, domain string, reuse bool) ([]byte, error)

Join joins a host to the fake domain