Skip to content

Commit a8e6024

Browse files
committed
This should fix the args test to cover more cases
1 parent 1fd4b79 commit a8e6024

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/helm/controller_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66
"time"
77

8-
"github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1"
8+
v1 "github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1"
99
helmMock "github.com/rancher/helm-controller/pkg/generated/controllers/helm.cattle.io/v1/fakes"
1010
jobsv1 "github.com/rancher/wrangler-api/pkg/generated/controllers/batch/v1"
1111
jobsMock "github.com/rancher/wrangler-api/pkg/generated/controllers/batch/v1/fakes"
@@ -58,7 +58,7 @@ func TestDeleteJob(t *testing.T) {
5858
func TestInstallArgs(t *testing.T) {
5959
assert := assert.New(t)
6060
stringArgs := strings.Join(args(NewChart()), " ")
61-
assert.Equal("install --name traefik stable/traefik --set-string rbac.enabled=true --set-string ssl.enabled=true", stringArgs)
61+
assert.Equal("install --name traefik stable/traefik --set-string acme.dnsProvider.name=cloudflare --set rbac.enabled=true --set ssl.enabled=false", stringArgs)
6262
}
6363

6464
func TestDeleteArgs(t *testing.T) {
@@ -73,7 +73,8 @@ func TestDeleteArgs(t *testing.T) {
7373
func NewChart() *v1.HelmChart {
7474
var set = make(map[string]intstr.IntOrString)
7575
set["rbac.enabled"] = intstr.IntOrString{StrVal: "true"}
76-
set["ssl.enabled"] = intstr.IntOrString{StrVal: "true"}
76+
set["ssl.enabled"] = intstr.IntOrString{StrVal: "false"}
77+
set["acme.dnsProvider.name"] = intstr.IntOrString{StrVal: "cloudflare"}
7778

7879
return v1.NewHelmChart("kube-system", "traefik", v1.HelmChart{
7980
Spec: v1.HelmChartSpec{

0 commit comments

Comments
 (0)