From ab1f95fa81567c86bba5e846b5c5e521a3c6516a Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 21 Oct 2020 20:46:54 -0400 Subject: [PATCH] feat(test): Adapt completion tests to Cobra 1.1 Cobra 1.1 trims completions so we need to remove extra spaces from the tests. Signed-off-by: Marc Khouzam --- cmd/helm/testdata/output/plugin_args_comp.txt | 2 +- cmd/helm/testdata/output/plugin_args_flag_comp.txt | 2 +- cmd/helm/testdata/output/plugin_args_ns_comp.txt | 2 +- cmd/helm/testdata/output/plugin_echo_bad_directive.txt | 2 +- cmd/helm/testdata/output/plugin_echo_no_directive.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/helm/testdata/output/plugin_args_comp.txt b/cmd/helm/testdata/output/plugin_args_comp.txt index 007112d31..4070cb1e6 100644 --- a/cmd/helm/testdata/output/plugin_args_comp.txt +++ b/cmd/helm/testdata/output/plugin_args_comp.txt @@ -1,6 +1,6 @@ plugin.complete was called Namespace: default Num args received: 1 -Args received: +Args received: :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/cmd/helm/testdata/output/plugin_args_flag_comp.txt b/cmd/helm/testdata/output/plugin_args_flag_comp.txt index c7a09e3fa..87300fa97 100644 --- a/cmd/helm/testdata/output/plugin_args_flag_comp.txt +++ b/cmd/helm/testdata/output/plugin_args_flag_comp.txt @@ -1,6 +1,6 @@ plugin.complete was called Namespace: default Num args received: 2 -Args received: --myflag +Args received: --myflag :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/cmd/helm/testdata/output/plugin_args_ns_comp.txt b/cmd/helm/testdata/output/plugin_args_ns_comp.txt index 26cd79b98..13bfcd3f4 100644 --- a/cmd/helm/testdata/output/plugin_args_ns_comp.txt +++ b/cmd/helm/testdata/output/plugin_args_ns_comp.txt @@ -1,6 +1,6 @@ plugin.complete was called Namespace: mynamespace Num args received: 1 -Args received: +Args received: :2 Completion ended with directive: ShellCompDirectiveNoSpace diff --git a/cmd/helm/testdata/output/plugin_echo_bad_directive.txt b/cmd/helm/testdata/output/plugin_echo_bad_directive.txt index 8038b9525..9f2802581 100644 --- a/cmd/helm/testdata/output/plugin_echo_bad_directive.txt +++ b/cmd/helm/testdata/output/plugin_echo_bad_directive.txt @@ -1,6 +1,6 @@ echo plugin.complete was called Namespace: default Num args received: 1 -Args received: +Args received: :0 Completion ended with directive: ShellCompDirectiveDefault diff --git a/cmd/helm/testdata/output/plugin_echo_no_directive.txt b/cmd/helm/testdata/output/plugin_echo_no_directive.txt index 7001be0e9..99cc47c13 100644 --- a/cmd/helm/testdata/output/plugin_echo_no_directive.txt +++ b/cmd/helm/testdata/output/plugin_echo_no_directive.txt @@ -1,6 +1,6 @@ echo plugin.complete was called Namespace: mynamespace Num args received: 1 -Args received: +Args received: :0 Completion ended with directive: ShellCompDirectiveDefault