Closed ekoops closed 1 month ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ekoops Once this PR has been reviewed and has the lgtm label, please assign alacuku for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area pkg
What this PR does / why we need it: This PR provides the foundation to develop a completely declarative test framework. It introduces the following addition:
pkg/test/loader
package) to load YAML tests configurationpkg/test/step
) and field binding A test is made of multiple test steps. A test step has two mandatory fields:type
andname
. Thetype
is used to identify the kind of step the user wants to run and the remaining set of parameters the user must provide in order to run it. Thename
is used to uniquely identify the step in order to let other test steps reference it in a subsequent "field binding", A field binding a field allows to reuse the value of a field of a preceding step. In a test YAML description, a field binding will look like this:dstField: ${stepName.srcField}
.pkg/test/field
package) This leverages reflection and struct field tagging to move around field values and check for semantic assignability. A source field is assignable to a destination field if the following two condition applies:field_type
. Afield_type
is assigned to a field via struct field tagging.pkg/test/step/syscall/base
) This leverages reflection.write
read
open
openat
openat2
symlink
symlinkat
link
linkat
init_module
finit_module
dup
dup2
dup3
connect
socket
sendto
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: