This commit is contained in:
admju
2024-09-09 14:17:02 +00:00
parent 550675a4aa
commit 13025746e6
32 changed files with 1597 additions and 664 deletions

View File

@@ -1,22 +1,18 @@
package helm
import (
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestHelmVersion(t *testing.T){
bin := filepath.Join(TEST_BIN_DIR, "helm")
os.Chmod(bin, 0700)
assert.FileExists(t, bin, "TestHelmVersion error")
version, err := Version(bin)
assert.Nilf(t, err, "error message %s", bin)
assert.Equal(t, "v3.15.4+gfa9efb0", version, "TestHelmVersion error")
}
package helm
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHelmVersion(t *testing.T){
cmd := getCmdHelm(true, "v3.15.4+gfa9efb0\n")
version, err := cmd.GetVersion()
assert.Nilf(t, err, "error message %s", err)
assert.Equal(t, "v3.15.4+gfa9efb0", version, "TestHelmVersion error")
}