Commit 41f7c97a authored by libesz's avatar libesz

Fixing plugin test

In the TestLoadDir test case, currently reflect.DeepEqual is expected to fail by error. Expected metadata is different than in the fixture yaml. Also, the type of the struct is mismatching in DeepEqual call (struct vs pointer to struct).
parent 6da348ba
...@@ -74,7 +74,7 @@ func TestLoadDir(t *testing.T) { ...@@ -74,7 +74,7 @@ func TestLoadDir(t *testing.T) {
t.Errorf("Expected dir %q, got %q", dirname, plug.Dir) t.Errorf("Expected dir %q, got %q", dirname, plug.Dir)
} }
expect := Metadata{ expect := &Metadata{
Name: "hello", Name: "hello",
Version: "0.1.0", Version: "0.1.0",
Usage: "usage", Usage: "usage",
...@@ -84,8 +84,8 @@ func TestLoadDir(t *testing.T) { ...@@ -84,8 +84,8 @@ func TestLoadDir(t *testing.T) {
IgnoreFlags: true, IgnoreFlags: true,
} }
if reflect.DeepEqual(expect, plug.Metadata) { if !reflect.DeepEqual(expect, plug.Metadata) {
t.Errorf("Expected name %v, got %v", expect, plug.Metadata) t.Errorf("Expected plugin metadata %v, got %v", expect, plug.Metadata)
} }
} }
......
...@@ -3,6 +3,6 @@ version: "0.1.0" ...@@ -3,6 +3,6 @@ version: "0.1.0"
usage: "usage" usage: "usage"
description: |- description: |-
description description
command: "$HELM_PLUGIN_SELF/helm-hello" command: "$HELM_PLUGIN_SELF/hello.sh"
useTunnel: true useTunnel: true
ignoreFlags: true ignoreFlags: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment