mirror of
https://github.com/appleboy/drone-ssh.git
synced 2026-06-04 10:15:07 +08:00
refactor: error var missingXXX should have name of the form errFoo
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
+3
-3
@@ -16,7 +16,7 @@ func TestMissingHostOrUser(t *testing.T) {
|
||||
err := plugin.Exec()
|
||||
|
||||
assert.NotNil(t, err)
|
||||
assert.Equal(t, missingHost, err)
|
||||
assert.Equal(t, errMissingHost, err)
|
||||
}
|
||||
|
||||
func TestMissingKeyOrPassword(t *testing.T) {
|
||||
@@ -31,7 +31,7 @@ func TestMissingKeyOrPassword(t *testing.T) {
|
||||
err := plugin.Exec()
|
||||
|
||||
assert.NotNil(t, err)
|
||||
assert.Equal(t, missingPasswordOrKey, err)
|
||||
assert.Equal(t, errMissingPasswordOrKey, err)
|
||||
}
|
||||
|
||||
func TestSetPasswordAndKey(t *testing.T) {
|
||||
@@ -48,7 +48,7 @@ func TestSetPasswordAndKey(t *testing.T) {
|
||||
err := plugin.Exec()
|
||||
|
||||
assert.NotNil(t, err)
|
||||
assert.Equal(t, setPasswordandKey, err)
|
||||
assert.Equal(t, errSetPasswordandKey, err)
|
||||
}
|
||||
|
||||
func TestIncorrectPassword(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user