kubernetesk8s.io/kubernetes/test/conformance/behaviors Index | Files

package behaviors

import "k8s.io/kubernetes/test/conformance/behaviors"

Index

Functions

func BehaviorFileList

func BehaviorFileList(dir string) ([]string, error)

BehaviorFileList returns a list of eligible behavior files in or under dir

func ValidateSuite

func ValidateSuite(suite *Suite) error

ValidateSuite validates that the given suite has no duplicate behavior IDs

Types

type Area

type Area struct {
	Area   string  `json:"area,omitempty"`
	Suites []Suite `json:"suites,omitempty"`
}

Area is a conformance area composed of a list of test suites

type Behavior

type Behavior struct {
	ID          string `json:"id,omitempty"`
	APIObject   string `json:"apiObject,omitempty"`
	APIField    string `json:"apiField,omitempty"`
	APIType     string `json:"apiType,omitempty"`
	Description string `json:"description,omitempty"`
}

Behavior describes the set of properties for a conformance behavior

type ConformanceData

type ConformanceData struct {
	// A URL to the line of code in the kube src repo for the test. Omitted from the YAML to avoid exposing line number.
	URL string `yaml:"-"`
	// Extracted from the "Testname:" comment before the test
	TestName string
	// CodeName is taken from the actual ginkgo descriptions, e.g. `[sig-apps] Foo should bar [Conformance]`
	CodeName string
	// Extracted from the "Description:" comment before the test
	Description string
	// Version when this test is added or modified ex: v1.12, v1.13
	Release string
	// File is the filename where the test is defined. We intentionally don't save the line here to avoid meaningless changes.
	File string
	// Behaviors is the list of conformance behaviors tested by a particular e2e test
	Behaviors []string `yaml:"behaviors,omitempty"`
}

ConformanceData describes the structure of the conformance.yaml file

type Suite

type Suite struct {
	Suite       string     `json:"suite,omitempty"`
	Description string     `json:"description,omitempty"`
	Behaviors   []Behavior `json:"behaviors,omitempty"`
}

Suite is a conformance test suite composed of a list of behaviors

func LoadSuite

func LoadSuite(path string) (*Suite, error)

LoadSuite loads a Behavior Suite from .yaml file at path

Source Files

behaviors.go types.go

Version
v1.19.14
Published
Aug 11, 2021
Platform
js/wasm
Imports
8 packages
Last checked
9 minutes ago

Tools for package owners.