package
0.33.0-alpha.2
Repository: https://github.com/kubernetes/component-base.git
Documentation: pkg.go.dev

# Functions

DefaultingTest run defaulting tests for given scheme.
GetDefaultingTestCases returns defaulting testcases for given scheme.
GetRoundtripTestCases returns the testcases for roundtrip testing for given scheme.
RoundTripTest runs roundtrip tests for given scheme.
RunTestsOnYAMLData decodes the yaml file from specified path, encodes the object and matches with expected yaml in specified path.
VerifyExternalTypePackage tests if external component config package is defined correctly Test tag naming (json name should match Go name) Test that GroupName has the k8s.io suffix Test that GroupName == SchemeGroupVersion.GroupName Test that the API version follows the right pattern and isn't internal Test that addKnownTypes and AddToScheme registers at least one type and doesn't error Test that the GroupName is named correctly (based on ComponentName), and there is a {Component}Configuration kind in the scheme.
VerifyInternalTypePackage tests if internal component config package is defined correctly Test tag naming (no tags allowed) Test that GroupName has the k8s.io suffix Test that GroupName == SchemeGroupVersion.GroupName API version should be internal Test that addKnownTypes and AddToScheme registers at least one type and doesn't error Test that the GroupName is named correctly (based on ComponentName), and there is a {Component}Configuration kind in the scheme.

# Variables

APIVersionRegexp is the regular expression that matches with valid apiversion.

# Structs

ComponentConfigPackage is used in APIGroup Testing.
TestCase defines a testcase for roundtrip and defaulting tests.