servicetest

package
v0.53.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package servicetest provides tests for the services installed by the Windows Agent

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertServiceUsers

func AssertServiceUsers(t *testing.T, expected windowsCommon.ServiceConfigMap, actual windowsCommon.ServiceConfigMap) bool

AssertServiceUsers asserts that the service users from the expected map match the actual map

Compares UserSIDs rather than UserNames to avoid needing to handle name formatting differences

Types

type Option

type Option = func(*Tester) error

Option is a functional option for Tester

func WithExpectedAgentUser

func WithExpectedAgentUser(domain string, username string) Option

WithExpectedAgentUser sets the expected user for the Agent

type Tester

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

Tester provides tests for the services installed by the Windows Agent

func NewTester

func NewTester(host *components.RemoteHost, opts ...Option) (*Tester, error)

NewTester creates a new Tester

func (*Tester) TestInstall

func (t *Tester) TestInstall(tt *testing.T) bool

TestInstall tests the expectations for the installed services

Jump to

Keyboard shortcuts

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