2024-09-02 13:44:44 +02:00
|
|
|
package helm
|
|
|
|
|
|
|
|
import (
|
2024-09-04 09:11:13 +02:00
|
|
|
"os"
|
|
|
|
"path/filepath"
|
2024-09-02 13:44:44 +02:00
|
|
|
|
2024-09-04 09:11:13 +02:00
|
|
|
"testing"
|
2024-09-02 13:44:44 +02:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestHelmVersion(t *testing.T){
|
2024-09-04 09:11:13 +02:00
|
|
|
|
|
|
|
bin := filepath.Join(TEST_BIN_DIR, "helm")
|
|
|
|
os.Chmod(bin, 0700)
|
2024-09-02 13:44:44 +02:00
|
|
|
assert.FileExists(t, bin, "TestHelmVersion error")
|
|
|
|
|
2024-09-04 09:11:13 +02:00
|
|
|
version, err := Version(bin)
|
2024-09-02 13:44:44 +02:00
|
|
|
|
2024-09-04 09:11:13 +02:00
|
|
|
assert.Nilf(t, err, "error message %s", bin)
|
|
|
|
assert.Equal(t, "v3.15.4+gfa9efb0", version, "TestHelmVersion error")
|
2024-09-02 09:09:46 +02:00
|
|
|
}
|