MCPcopy Create free account
hub / github.com/Climatik-Project/Climatik-Project / LoadImageToKindClusterWithName

Function LoadImageToKindClusterWithName

test/utils/utils.go:107–116  ·  view source on GitHub ↗

LoadImageToKindCluster loads a local docker image to the kind cluster

(name string)

Source from the content-addressed store, hash-verified

105
106// LoadImageToKindCluster loads a local docker image to the kind cluster
107func LoadImageToKindClusterWithName(name string) error {
108 cluster := "kind"
109 if v, ok := os.LookupEnv("KIND_CLUSTER"); ok {
110 cluster = v
111 }
112 kindOptions := []string{"load", "docker-image", name, "--name", cluster}
113 cmd := exec.Command("kind", kindOptions...)
114 _, err := Run(cmd)
115 return err
116}
117
118// GetNonEmptyLines converts given command output string into individual objects
119// according to line breakers, and ignores the empty elements in it.

Callers 1

e2e_test.goFile · 0.92

Calls 1

RunFunction · 0.85

Tested by

no test coverage detected