Skip to content

Commit

Permalink
fix(tests): Remove unnecessary test
Browse files Browse the repository at this point in the history
Testing that a bad completion directive was being replaced by the
default one was actually testing Cobra's behaviour.  This is unnecessary
especially since that behaviour changed in the 1.2.0 release.  Helm
tests should focus on testing Helm's behaviour.

Signed-off-by: Marc Khouzam <[email protected]>
  • Loading branch information
marckhouzam authored and tylerauerbeck committed Aug 5, 2021
1 parent a4b4a3c commit 28f919b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
5 changes: 0 additions & 5 deletions cmd/helm/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,6 @@ func TestPluginDynamicCompletion(t *testing.T) {
cmd: "__complete echo -n mynamespace ''",
golden: "output/plugin_echo_no_directive.txt",
rels: []*release.Release{},
}, {
name: "completion for plugin bad directive",
cmd: "__complete echo ''",
golden: "output/plugin_echo_bad_directive.txt",
rels: []*release.Release{},
}}
for _, test := range tests {
settings.PluginsDirectory = "testdata/helmhome/helm/plugins"
Expand Down
3 changes: 1 addition & 2 deletions cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.complete
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ echo "Args received: ${@}"

# Final printout is the optional completion directive of the form :<directive>
if [ "$HELM_NAMESPACE" = "default" ]; then
# Output an invalid directive, which should be ignored
echo ":2222"
echo ":0"
# else
# Don't include the directive, to test it is really optional
fi
6 changes: 0 additions & 6 deletions cmd/helm/testdata/output/plugin_echo_bad_directive.txt

This file was deleted.

0 comments on commit 28f919b

Please sign in to comment.