identifier

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package identifier provides a test identifier definition for tnf.Test implementations and a catalog of known tests.

Index

Constants

View Source
const (
	// Normative is the test type used for a test that returns normative results.
	Normative = "normative"
)

Variables

View Source
var Catalog = map[string]TestCatalogEntry{
	// contains filtered or unexported fields
}

Catalog is the test catalog.

View Source
var HostnameIdentifier = Identifier{
	URL:             hostnameIdentifierURL,
	SemanticVersion: versionOne,
}

HostnameIdentifier is the Identifier used to represent the generic hostname test case.

View Source
var IPAddrIdentifier = Identifier{
	URL:             ipAddrIdentifierURL,
	SemanticVersion: versionOne,
}

IPAddrIdentifier is the Identifier used to represent the generic IP Addr test case.

View Source
var NodesIdentifier = Identifier{
	URL:             nodesIdentifierURL,
	SemanticVersion: versionOne,
}

NodesIdentifier is the Identifier used to represent the nodes test case.

View Source
var OperatorIdentifier = Identifier{
	URL:             operatorIdentifierURL,
	SemanticVersion: versionOne,
}

OperatorIdentifier is the Identifier used to represent the operator-specific test suite.

View Source
var PingIdentifier = Identifier{
	URL:             pingIdentifierURL,
	SemanticVersion: versionOne,
}

PingIdentifier is the Identifier used to represent the generic Ping test.

View Source
var PodIdentifier = Identifier{
	URL:             podIdentifierURL,
	SemanticVersion: versionOne,
}

PodIdentifier is the Identifier used to represent the container-specific test suite.

View Source
var VersionIdentifier = Identifier{
	URL:             versionIdentifierURL,
	SemanticVersion: versionOne,
}

VersionIdentifier is the Identifier used to represent the generic container base image test.

Functions

This section is empty.

Types

type Identifier

type Identifier struct {
	// URL stores the unique identifier for a test.
	URL string `json:"url" yaml:"url"`
	// SemanticVersion stores the version of the test.
	SemanticVersion string `json:"version" yaml:"version"`
}

Identifier is a per tnf.Test unique identifier.

func (*Identifier) UnmarshalJSON

func (i *Identifier) UnmarshalJSON(b []byte) error

UnmarshalJSON provides a custom JSON Unmarshal function which performs URL and SemanticVersion validation.

type IntrusionSettings

type IntrusionSettings struct {
	// ModifiesSystem records whether the test makes changes to target systems.
	ModifiesSystem bool `json:"modifiesSystem" yaml:"modifiesSystem"`

	// ModificationIsPersistent records whether the test makes a modification to the system that persists after the test
	// completes.  This is not always negative, and could involve something like setting up a tunnel that is used in
	// future tests.
	ModificationIsPersistent bool `json:"modificationIsPersistent" yaml:"modificationIsPersistent"`
}

IntrusionSettings is used to specify test intrusion behavior into a target system.

type TestCatalogEntry

type TestCatalogEntry struct {

	// Identifier is the unique test identifier.
	Identifier Identifier `json:"identifier" yaml:"identifier"`

	// Description is a helpful description of the purpose of the test.
	Description string `json:"description" yaml:"description"`

	// Type is the type of the test (i.e., normative).
	Type string `json:"type" yaml:"type"`

	// IntrusionSettings is used to specify test intrusion behavior into a target system.
	IntrusionSettings IntrusionSettings `json:"intrusionSettings" yaml:"intrusionSettings"`

	// BinaryDependencies tracks the needed binaries to complete tests, such as `ping`.
	BinaryDependencies []string `json:"binaryDependencies" yaml:"binaryDependencies"`
}

TestCatalogEntry is a container for required test facets.

Jump to

Keyboard shortcuts

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