e2e-framework-node: add runtimeclass to dedup code

Similar functionality is required across e2e tests for RuntimeClass.
Let's create runtimeclass as part of the framework/node package.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
Eric Ernst
2020-01-14 11:55:15 -08:00
parent 056374d9c8
commit e5760015d2
7 changed files with 73 additions and 69 deletions

View File

@@ -877,18 +877,3 @@ func (cl *ClusterVerification) ForEach(podFunc func(v1.Pod)) error {
return err
}
const (
// preconfiguredRuntimeHandler is the name of the runtime handler that is expected to be
// preconfigured in the test environment.
preconfiguredRuntimeHandler = "test-handler"
)
// PreconfiguredRuntimeClassHandler returns configured runtime handler.
func PreconfiguredRuntimeClassHandler() string {
if TestContext.ContainerRuntime == "docker" {
return TestContext.ContainerRuntime
}
return preconfiguredRuntimeHandler
}