test

package
v0.0.0-...-f2f35e6 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildupTestEnvironment

func BuildupTestEnvironment(dockerPath string)

BuildupTestEnvironment build up the test environment

func CleanupTestEnvironment

func CleanupTestEnvironment(dockerPath string)

CleanupTestEnvironment cleans up the test environment

func ProcessRequest

func ProcessRequest(r request.Request, port int) (request.Response, error)

ProcessRequest sends the request to the thola api and returns the response

func WaitForSNMPSim

func WaitForSNMPSim(community string, port int) error

WaitForSNMPSim waits until the snmp sim initialized all devices

Types

type DeviceTestData

type DeviceTestData struct {
	Type         string                     `json:"type"`
	Expectations DeviceTestDataExpectations `json:"expectations"`
	Connection   network.ConnectionData     `json:"-"`
}

DeviceTestData represents a test_data.yaml file.

func (*DeviceTestData) GetAvailableRequestTypes

func (d *DeviceTestData) GetAvailableRequestTypes() []string

GetAvailableRequestTypes returns all available request types

type DeviceTestDataExpectations

type DeviceTestDataExpectations struct {
	Identify              *request.IdentifyResponse            `json:"identify" mapstructure:"identify"`
	ReadCountInterfaces   *request.ReadCountInterfacesResponse `json:"readCountInterfaces" mapstructure:"readCountInterfaces"`
	CheckInterfaceMetrics *request.CheckResponse               `json:"checkInterfaceMetrics" mapstructure:"checkInterfaceMetrics"`
	CheckUPS              *request.CheckResponse               `json:"checkUPS" mapstructure:"checkUPS"`
	CheckCPULoad          *request.CheckResponse               `json:"checkCPULoad" mapstructure:"checkCPULoad"`
	CheckMemoryUsage      *request.CheckResponse               `json:"checkMemoryUsage" mapstructure:"checkMemoryUsage"`
	CheckDisk             *request.CheckResponse               `json:"checkDisk" mapstructure:"checkDisk"`
	CheckServer           *request.CheckResponse               `json:"checkServer" mapstructure:"checkServer"`
	CheckSBC              *request.CheckResponse               `json:"checkSBC" mapstructure:"checkSBC"`
	CheckHardwareHealth   *request.CheckResponse               `json:"checkHardwareHealth" mapstructure:"checkHardwareHealth"`
}

DeviceTestDataExpectations represents the expectations part of an test data file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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