From 0745e13d396e6a5c3d6aa28d9794a2d3fcdc8103 Mon Sep 17 00:00:00 2001 From: "Bo-Yi.Wu" Date: Sun, 9 Apr 2023 17:06:03 +0800 Subject: [PATCH] test: refactor plugin_test.go file and optimize code - Remove the `TestSetPasswordAndKey` function from `plugin_test.go` Signed-off-by: Bo-Yi.Wu --- plugin_test.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/plugin_test.go b/plugin_test.go index 4df7e08..e57e58f 100644 --- a/plugin_test.go +++ b/plugin_test.go @@ -51,23 +51,6 @@ func TestMissingSourceConfig(t *testing.T) { assert.NotNil(t, err) } -func TestSetPasswordAndKey(t *testing.T) { - plugin := Plugin{ - Config: Config{ - Host: []string{"example.com"}, - Username: "ubuntu", - Port: "443", - Password: "1234", - Key: "test", - }, - } - - err := plugin.Exec() - - assert.NotNil(t, err) - assert.Equal(t, errSetPasswordandKey, err) -} - func TestTrimElement(t *testing.T) { var input, result []string