test

package
v0.1.0-M4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0, EPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ActivityID = "testActivityId"

ActivityID test constant

View Source
const Domain = "testDomain"

Domain test constant

View Source
const Interval = 1 * time.Second

Interval test constant

Variables

View Source
var DesiredState = &types.DesiredState{
	Domains: []*types.Domain{
		{
			ID: "domain1",
		},
	},
}

DesiredState test constant

View Source
var Inventory = &types.Inventory{
	SoftwareNodes: []*types.SoftwareNode{
		MainInventoryNode,
	},
}

Inventory test constant

View Source
var MainInventoryNode = &types.SoftwareNode{
	InventoryNode: types.InventoryNode{
		ID:      "device-update-manager",
		Version: "development",
		Name:    "Update Manager",
	},
	Type: types.SoftwareTypeApplication,
}

MainInventoryNode test constant

View Source
var SampleTestHardwareNode = []*types.HardwareNode{
	{
		InventoryNode: types.InventoryNode{
			ID:      "testId",
			Version: "3.0.0",
			Name:    "testName",
			Parameters: []*types.KeyValuePair{
				{
					Key:   "k1",
					Value: "v1",
				},
			},
		},
	},
}

SampleTestHardwareNode test constant

Functions

func AssertInventoryWithoutElementsOrder

func AssertInventoryWithoutElementsOrder(t *testing.T, inv1, inv2 *types.Inventory)

AssertInventoryWithoutElementsOrder function for assertion types.Inventory without HW, SW, Association nodes

func AssertWithTimeout

func AssertWithTimeout(t *testing.T, waitGroup *sync.WaitGroup, testTimeout time.Duration)

AssertWithTimeout asserts that an operation is completed within a certain period of time

func CreateAssociation

func CreateAssociation(sourceID, targetID string) *types.Association

CreateAssociation function for creation of test Association

func CreateSoftwareNode

func CreateSoftwareNode(domain string, number int, key string, value string, swType types.SoftwareType) *types.SoftwareNode

CreateSoftwareNode function for creation of SoftwareNode

Types

This section is empty.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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