oc-deploy/src/helm/repo_test.go
2024-09-06 07:39:46 +00:00

39 lines
831 B
Go

package helm
import (
"fmt"
// "os"
// "path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestHelmRepoAdd(t *testing.T) {
repo := HelmRepo{
Bin: "./helm",
Name: "repooc",
Repository: "https://url",
ForceUpdate: true,
Opts: ""}
fmt.Println(" TestHelmRepoAdd ", repo)
res, err := repo.AddRepository()
fmt.Println("TestHelmRepoAdd.24", res, err)
}
// helm : not found
func TestHelmRepoAddErr(t *testing.T) {
repo := HelmRepo{
Bin: "./helm",
Name: "repooc",
Repository: "https://url",
ForceUpdate: true,
Opts: ""}
_, err := repo.AddRepository()
assert.NotNilf(t, err, "error message %s", "./helm")
}