getsetv

package
v0.0.0-...-6fa03d5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

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

  1. Perform an initial Set operation, which can be used to initialise the target system to a known good state.
  2. Perform a Get operation, whose result is compared against a specified GetResponse.
  3. Perform a Set operation, which can be used to test a particular behaviour of the system.
  4. 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.

Jump to

Keyboard shortcuts

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