Documentation
¶
Overview ¶
Package identifier provides a test identifier definition for tnf.Test implementations and a catalog of known tests.
Index ¶
Constants ¶
const (
// Normative is the test type used for a test that returns normative results.
Normative = "normative"
)
Variables ¶
var Catalog = map[string]TestCatalogEntry{ // contains filtered or unexported fields }
Catalog is the test catalog.
var HostnameIdentifier = Identifier{
URL: hostnameIdentifierURL,
SemanticVersion: versionOne,
}
HostnameIdentifier is the Identifier used to represent the generic hostname test case.
var IPAddrIdentifier = Identifier{
URL: ipAddrIdentifierURL,
SemanticVersion: versionOne,
}
IPAddrIdentifier is the Identifier used to represent the generic IP Addr test case.
var NodesIdentifier = Identifier{
URL: nodesIdentifierURL,
SemanticVersion: versionOne,
}
NodesIdentifier is the Identifier used to represent the nodes test case.
var OperatorIdentifier = Identifier{
URL: operatorIdentifierURL,
SemanticVersion: versionOne,
}
OperatorIdentifier is the Identifier used to represent the operator-specific test suite.
var PingIdentifier = Identifier{
URL: pingIdentifierURL,
SemanticVersion: versionOne,
}
PingIdentifier is the Identifier used to represent the generic Ping test.
var PodIdentifier = Identifier{
URL: podIdentifierURL,
SemanticVersion: versionOne,
}
PodIdentifier is the Identifier used to represent the container-specific test suite.
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.