mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-21 15:08:06 +00:00
24 lines
598 B
Go
24 lines
598 B
Go
package kind
|
|
|
|
import (
|
|
"os"
|
|
|
|
//nolint:staticcheck // ST1001
|
|
. "github.com/onsi/ginkgo/v2"
|
|
//nolint:staticcheck // ST1001
|
|
. "github.com/onsi/gomega"
|
|
|
|
"github.com/1Password/onepassword-operator/pkg/testhelper/system"
|
|
)
|
|
|
|
// LoadImageToKind loads a local docker image to the Kind cluster
|
|
func LoadImageToKind(imageName string) {
|
|
By("loading the operator image on Kind")
|
|
clusterName := "kind"
|
|
if value, ok := os.LookupEnv("KIND_CLUSTER"); ok {
|
|
clusterName = value
|
|
}
|
|
_, err := system.Run("kind", "load", "docker-image", imageName, "--name", clusterName)
|
|
Expect(err).NotTo(HaveOccurred())
|
|
}
|