Update test data to reflect code move to staging
This commit is contained in:
@@ -60,6 +60,7 @@ go_library(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["cmd_test.go"],
|
||||
data = ["//pkg/kubectl/cmd/plugin/testdata"],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library",
|
||||
|
@@ -100,7 +100,7 @@ func TestKubectlCommandHandlesPlugins(t *testing.T) {
|
||||
}
|
||||
|
||||
if pluginsHandler.executedPlugin != test.expectPlugin {
|
||||
t.Fatalf("unexpected plugin execution: expedcted %q, got %q", test.expectPlugin, pluginsHandler.executedPlugin)
|
||||
t.Fatalf("unexpected plugin execution: expected %q, got %q", test.expectPlugin, pluginsHandler.executedPlugin)
|
||||
}
|
||||
|
||||
if len(pluginsHandler.withArgs) != len(test.expectPluginArgs) {
|
||||
|
22
pkg/kubectl/cmd/plugin/testdata/BUILD
vendored
Normal file
22
pkg/kubectl/cmd/plugin/testdata/BUILD
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
filegroup(
|
||||
name = "testdata",
|
||||
srcs = glob([
|
||||
"**/*",
|
||||
]),
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
3
pkg/kubectl/cmd/plugin/testdata/kubectl-foo
vendored
Executable file
3
pkg/kubectl/cmd/plugin/testdata/kubectl-foo
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "I am plugin foo"
|
4
pkg/kubectl/cmd/plugin/testdata/kubectl-version
vendored
Executable file
4
pkg/kubectl/cmd/plugin/testdata/kubectl-version
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This plugin is a no-op and is used to test plugins
|
||||
# that overshadow existing kubectl commands
|
Reference in New Issue
Block a user