mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 06:44:35 +02:00
add unittest for constants.go
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -2,8 +2,10 @@ package tmpl
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"gotest.tools/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -21,7 +23,7 @@ func Test_fetchSecretValue(t *testing.T) {
|
||||
valsResult["key"] = "key_value"
|
||||
c.EXPECT().Eval(expectArg).Return(valsResult, nil)
|
||||
result, err := fetchSecretValue(secretPath)
|
||||
assert.NilError(t, err)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, result, "key_value")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user