Documentation
¶
Overview ¶
Package claim provides a test-network-definition claim schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTestCaseDescription ¶ added in v1.0.10
func BuildTestCaseDescription(testID, suiteName, description, remediation, exception, reference string, qe bool, categoryclassification map[string]string, tags ...string) (TestCaseDescription, Identifier)
Types ¶
type CatalogInfo ¶ added in v1.0.24
type CatalogInfo struct {
// Link to the best practice document supporting this test case
BestPracticeReference string `json:"bestPracticeReference"`
// The test description.
Description string `json:"description"`
// Indicates the exception process if defined
ExceptionProcess string `json:"exceptionProcess"`
// steps required to fix a failing test case
Remediation string `json:"remediation"`
}
CatalogInfo test specific information from the catalog
func (*CatalogInfo) MarshalJSON ¶ added in v1.0.24
func (strct *CatalogInfo) MarshalJSON() ([]byte, error)
func (*CatalogInfo) UnmarshalJSON ¶ added in v1.0.24
func (strct *CatalogInfo) UnmarshalJSON(b []byte) error
type CategoryClassification ¶ added in v1.0.15
type CategoryClassification struct {
// indicates whether this test case is mandatory or optional in the Extended scenario
Extended string `json:"Extended,omitempty"`
// indicates whether this test case is mandatory or optional in the FarEdge scenario
FarEdge string `json:"FarEdge,omitempty"`
// indicates whether this test case is mandatory or optional in the NonTelco scenario
NonTelco string `json:"NonTelco,omitempty"`
// indicates whether this test case is mandatory or optional in the Telco scenario
Telco string `json:"Telco,omitempty"`
}
CategoryClassification categoryClassification is the classification for a single test case.
func (*CategoryClassification) MarshalJSON ¶ added in v1.0.24
func (strct *CategoryClassification) MarshalJSON() ([]byte, error)
func (*CategoryClassification) UnmarshalJSON ¶ added in v1.0.24
func (strct *CategoryClassification) UnmarshalJSON(b []byte) error
type Claim ¶
type Claim struct {
// Tests within test-network-function often require configuration. For example, the generic test suite requires listing all CNF containers. This information is used to derive per-container IP address information, which is then used as input to the connectivity test suite. Test suites within test-network-function may use multiple configurations, but each with a unique name.
Configurations map[string]interface{} `json:"configurations"`
Metadata *Metadata `json:"metadata"`
// An OpenShift cluster is composed of an arbitrary number of Nodes used for platform and application services. Since a claim must be reproducible, a variety of per-Node information must be collected and stored in the claim. Node names are unique within a given OpenShift cluster.
Nodes map[string]interface{} `json:"nodes"`
// The test-network-function test results. Results are a JSON representation of the JUnit output.
RawResults map[string]interface{} `json:"rawResults"`
// The results for each unique test case.
Results map[string]interface{} `json:"results,omitempty"`
Versions *Versions `json:"versions"`
}
Claim
func (*Claim) MarshalJSON ¶
func (*Claim) UnmarshalJSON ¶
type Identifier ¶ added in v1.0.3
type Identifier struct {
// id stores a unique id for the testcase.
Id string `json:"id"`
// suite stores the test suite name for the testcase.
Suite string `json:"suite"`
// tags stores the different tags applied to a test.
Tags string `json:"tags,omitempty"`
}
Identifier identifier is a per testcase unique identifier.
func (*Identifier) MarshalJSON ¶ added in v1.0.3
func (strct *Identifier) MarshalJSON() ([]byte, error)
func (*Identifier) UnmarshalJSON ¶ added in v1.0.3
func (strct *Identifier) UnmarshalJSON(b []byte) error
type Metadata ¶
type Metadata struct {
// The UTC end time of a claim evaluation. This is recorded when the test-network-function test suite completes.
EndTime string `json:"endTime"`
// The UTC start time of a claim evaluation. This is recorded when the test-network-function test suite is invoked.
StartTime string `json:"startTime"`
}
Metadata
func (*Metadata) MarshalJSON ¶
func (*Metadata) UnmarshalJSON ¶
type Result ¶ added in v1.0.3
type Result struct {
// Ginkgo writer output during the test run.
CapturedTestOutput string `json:"capturedTestOutput"`
// Test detailed information from catalog
CatalogInfo *CatalogInfo `json:"catalogInfo"`
// Category classification for the test
CategoryClassification *CategoryClassification `json:"categoryClassification"`
// The duration of the test in nanoseconds.
Duration int `json:"duration"`
// The end time of the test.
EndTime string `json:"endTime,omitempty"`
// The content of the line where the failure happened
FailureLineContent string `json:"failureLineContent"`
// The Filename and line number where the failure happened
FailureLocation string `json:"failureLocation"`
// Describes the test failure in detail.
FailureReason string `json:"failureReason"`
// The start time of the test.
StartTime string `json:"startTime"`
// The test result state: INVALID SPEC STATE, pending,skipped,passed,failed,aborted,panicked,interrupted
State string `json:"state"`
// The test identifier
TestID *Identifier `json:"testID"`
}
Result result is the result of running a testcase.
func (*Result) MarshalJSON ¶ added in v1.0.3
func (*Result) UnmarshalJSON ¶ added in v1.0.3
type Root ¶
type Root struct {
Claim *Claim `json:"claim"`
}
Root A test-network-function claim is an attestation of the tests performed, the results and the various configurations. Since a claim must be reproducible, it also includes an overview of the systems under test and their physical configurations.
func (*Root) MarshalJSON ¶
func (*Root) UnmarshalJSON ¶
type TestCaseDescription ¶ added in v1.0.10
type TestCaseDescription struct {
// Identifier is the unique test identifier.
Identifier Identifier `json:"identifier" yaml:"identifier"`
// Description is a helpful description of the purpose of the test case.
Description string `json:"description" yaml:"description"`
// Remediation is an optional suggested remediation for passing the test.
Remediation string `json:"remediation,omitempty" yaml:"remediation,omitempty"`
// BestPracticeReference is a helpful best practice references of the test case.
BestPracticeReference string `json:"BestPracticeReference" yaml:"BestPracticeReference"`
// ExceptionProcess will show any possible exception processes documented for partners to follow.
ExceptionProcess string `json:"exceptionProcess,omitempty" yaml:"exceptionProcess,omitempty"`
// Tags will show all of the ginkgo tags that the test case applies to
Tags string `json:"tags,omitempty" yaml:"tags,omitempty"`
// Whether or not automated tests exist for the test case. Not to be rendered.
Qe bool `json:"qe" yaml:"qe"`
// classification for each test case
CategoryClassification map[string]string `json:"categoryclassification" yaml:"categoryclassification"`
}
TestCaseDescription describes a JUnit test case.
type Versions ¶
type Versions struct {
// The claim file format version.
ClaimFormat string `json:"claimFormat"`
// The Kubernetes release version.
K8s string `json:"k8s,omitempty"`
// The oc client release version.
OcClient string `json:"ocClient,omitempty"`
// OCP cluster release version.
Ocp string `json:"ocp,omitempty"`
// The test-network-function (tnf) release version.
Tnf string `json:"tnf"`
// The test-network-function (tnf) Git Commit.
TnfGitCommit string `json:"tnfGitCommit,omitempty"`
}
Versions
func (*Versions) MarshalJSON ¶
func (*Versions) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.