Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestCase ¶
type TestCase[T client.Object] struct { // Name is the name of the test case. Name string // TestObject is the object to be tested. TestObject T // ExpectedErrorMessage is the expected error message when creating the object. ExpectedErrorMessage *string // ExpectedUpdateErrorMessage is the expected error message when updating the object. ExpectedUpdateErrorMessage *string // Update is a function that updates the object in the test case after it's created. // It can be used to verify CEL rules that verify the previous object's version against the new one. Update func(T) }
TestCase represents a test case for CRD validation.
type TestCasesGroup ¶
TestCasesGroup is a group of test cases related to CRD validation.
func (TestCasesGroup[T]) Run ¶
func (g TestCasesGroup[T]) Run(t *testing.T)
Run runs all test cases in the group.
func (TestCasesGroup[T]) RunWithConfig ¶
RunWithConfig runs all test cases in the group against the provided rest.Config's cluster.
Click to show internal directories.
Click to hide internal directories.