m/test/launch/cli/launch-cluster: fix metroctl path
os.Executable() returns the path to launch-cluster, not metroctl. This
bug meant that trying to use kubectl on the cluster instead launched
another cluster.
Change-Id: I94305c2688e55e2d2776d4a141d80b9f4ee3ec8f
Reviewed-on: https://review.monogon.dev/c/monogon/+/3352
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/test/launch/cli/launch-cluster/BUILD.bazel b/metropolis/test/launch/cli/launch-cluster/BUILD.bazel
index 74067a7..250a1b1 100644
--- a/metropolis/test/launch/cli/launch-cluster/BUILD.bazel
+++ b/metropolis/test/launch/cli/launch-cluster/BUILD.bazel
@@ -4,14 +4,21 @@
go_library(
name = "launch-cluster_lib",
srcs = ["main.go"],
+ data = [
+ "//metropolis/cli/metroctl",
+ ],
importpath = "source.monogon.dev/metropolis/test/launch/cli/launch-cluster",
visibility = ["//visibility:private"],
+ x_defs = {
+ "xMetroctlPath": "$(rlocationpath //metropolis/cli/metroctl )",
+ },
deps = [
"//metropolis/cli/flagdefs",
"//metropolis/cli/metroctl/core",
"//metropolis/node",
"//metropolis/proto/common",
"//metropolis/test/launch",
+ "@io_bazel_rules_go//go/runfiles:go_default_library",
],
)