Add gotest adapter for standard Go tests#48
Add gotest adapter for standard Go tests#48gangwgr wants to merge 1 commit intoopenshift-eng:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gangwgr The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @gangwgr. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
70fb8d8 to
6b0e821
Compare
Similar to the Cypress adapter, this provides utilities for running
standard Go tests (*_test.go) via OTE without modifying test code.
Key features:
- Operators compile test packages into binaries (go test -c)
- Binaries are embedded in OTE extension binary (go:embed)
- At runtime, binaries are extracted and executed
- No hardcoded logic - operators provide all metadata
Example usage:
//go:embed compiled_tests/*.test
var embeddedTestBinaries embed.FS
metadata := []gotest.GoTestConfig{
{
TestName: "[sig-api-machinery] TestOperatorNamespace [Serial]",
BinaryName: "e2e.test",
TestPattern: "TestOperatorNamespace",
Tags: []string{"Serial"},
Lifecycle: "Informing",
},
}
specs, err := gotest.BuildExtensionTestSpecsFromGoTestMetadata(
metadata, embeddedTestBinaries, "compiled_tests",
)
6b0e821 to
160b9de
Compare
Similar to the Cypress adapter, this provides utilities for running standard Go tests (*_test.go) via OTE without modifying test code.
Key features:
Example usage:
//go:embed compiled_tests/*.test var embeddedTestBinaries embed.FS
metadata := []gotest.GoTestConfig{ {
TestName: "[sig-api-machinery] TestOperatorNamespace [Serial]",
BinaryName: "e2e.test",
TestPattern: "TestOperatorNamespace",
Tags: []string{"Serial"},
Lifecycle: "Informing",
},
}
specs, err := gotest.BuildExtensionTestSpecsFromGoTestMetadata(
metadata, embeddedTestBinaries, "compiled_tests",
)