mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-07-02 21:52:51 +08:00
test: refactor codebase to improve performance and readability
- Remove debug command block from `TestSudoCommand` test Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
f3ec458f57
commit
ce7d47c250
@ -918,9 +918,6 @@ func TestSudoCommand(t *testing.T) {
|
|||||||
var (
|
var (
|
||||||
buffer bytes.Buffer
|
buffer bytes.Buffer
|
||||||
expected = `
|
expected = `
|
||||||
======CMD======
|
|
||||||
sudo su - -c "whoami"
|
|
||||||
======END======
|
|
||||||
out: root
|
out: root
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
@ -936,7 +933,6 @@ func TestSudoCommand(t *testing.T) {
|
|||||||
},
|
},
|
||||||
CommandTimeout: 10 * time.Second,
|
CommandTimeout: 10 * time.Second,
|
||||||
RequireTty: true,
|
RequireTty: true,
|
||||||
Debug: true,
|
|
||||||
},
|
},
|
||||||
Writer: &buffer,
|
Writer: &buffer,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user