Documentation
¶
Overview ¶
Package getsetv defines the logic that implements the GetSetValidate tests for the gnmitest framework. These tests are described in tests.proto in detail. The procedure implemented by the test is
- Perform an initial Set operation, which can be used to initialise the target system to a known good state.
- Perform a Get operation, whose result is compared against a specified GetResponse.
- Perform a Set operation, which can be used to test a particular behaviour of the system.
- Perform a Get operation, whose result is again compared against a specified GetResponse.
The operations are paired such that 1+2, and 3+4 are considered together. Optionally, in each pair the Get or Set operation can be omitted. The initial operations (i.e., 1+2) may also be omitted. This test therefore allows a sequence of Get+Set tests, as well as individual tests for Get and Set if required.
All operations are performed sequentially. The failure of any one of the operations is considered fatal for the test.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSetValidate ¶
func GetSetValidate(ctx context.Context, testInst *tpb.GetSetValidationTest, spec *Specification) error
GetSetValidate runs the GetSetValidate test specified in testInst using the specification provided. It returns an error if encountered in the test, and writes it result to the Instance protobuf in the Specification.
Types ¶
type Specification ¶
type Specification struct {
Connection *tpb.Connection // Connection specifies the target to be connected to.
Instance *spb.Instance // Instance is the test instance that is being executed.
Result *rpb.Instance // Result is the result of the test instance that should be written to.
CommonRequests *spb.CommonMessages // CommonRequests is the library of common messages that can be referenced by the test.
}
Specification defines the parameters for a GetSetValidate test.