mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-22 23:48:05 +00:00
Move all helpers to testhelper
package
This commit is contained in:
17
test/testhelper/kind/kind.go
Normal file
17
test/testhelper/kind/kind.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user