Move all helpers to testhelper package

This commit is contained in:
Volodymyr Zotov
2025-08-19 12:04:56 -05:00
parent 5630d788a2
commit f8704223c8
4 changed files with 48 additions and 44 deletions

View File

@@ -0,0 +1,17 @@
package kind
import (
"os"
"github.com/1Password/onepassword-operator/test/cmd"
)
// LoadImageToKind loads a local docker image to the Kind cluster
func LoadImageToKind(imageName string) error {
clusterName := "kind"
if value, ok := os.LookupEnv("KIND_CLUSTER"); ok {
clusterName = value
}
_, err := cmd.Run("kind", "load", "docker-image", imageName, "--name", clusterName)
return err
}