feat: update plugin functionality in main.go and plugin.go files

- Add a new flag to the main.go file
- Add a new field to the Plugin type in the plugin.go file
- Remove two lines from the plugin_test.go file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2024-01-07 17:44:54 +08:00
parent d217773bac
commit b34fffdbd3
3 changed files with 11 additions and 2 deletions
+3 -2
View File
@@ -925,9 +925,9 @@ func TestSudoCommand(t *testing.T) {
buffer bytes.Buffer
expected = `
======CMD======
whoami
sudo su - -c "whoami"
======END======
out: drone-scp
out: root
`
)
@@ -941,6 +941,7 @@ func TestSudoCommand(t *testing.T) {
`sudo su - -c "whoami"`,
},
CommandTimeout: 10 * time.Second,
RequireTty: true,
},
Writer: &buffer,
}