mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
refactor: refactor test environment setup and command markers
- Add environment markers to `TestCommandOutput` for localhost and 127.0.0.1 - Remove command markers from `TestFingerprint` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
ce7d47c250
commit
366c76f84c
@ -365,6 +365,9 @@ func TestCommandOutput(t *testing.T) {
|
||||
whoami
|
||||
uname
|
||||
localhost: ======END======
|
||||
localhost: ======ENV======
|
||||
localhost:
|
||||
localhost: ======END======
|
||||
localhost: out: /home/drone-scp
|
||||
localhost: out: drone-scp
|
||||
localhost: out: Linux
|
||||
@ -373,6 +376,9 @@ func TestCommandOutput(t *testing.T) {
|
||||
whoami
|
||||
uname
|
||||
127.0.0.1: ======END======
|
||||
127.0.0.1: ======ENV======
|
||||
127.0.0.1:
|
||||
127.0.0.1: ======END======
|
||||
127.0.0.1: out: /home/drone-scp
|
||||
127.0.0.1: out: drone-scp
|
||||
127.0.0.1: out: Linux
|
||||
@ -444,9 +450,6 @@ func TestFingerprint(t *testing.T) {
|
||||
var (
|
||||
buffer bytes.Buffer
|
||||
expected = `
|
||||
======CMD======
|
||||
whoami
|
||||
======END======
|
||||
out: drone-scp
|
||||
`
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user