@@ -47,6 +47,8 @@ import (
47
47
"github.com/joelanford/helm-operator/pkg/internal/testutil"
48
48
)
49
49
50
+ const mockTestDesc = "Test Description"
51
+
50
52
var _ = Describe ("ActionClient" , func () {
51
53
var (
52
54
rm meta.RESTMapper
@@ -134,7 +136,7 @@ var _ = Describe("ActionClient", func() {
134
136
err error
135
137
)
136
138
By ("installing the release" , func () {
137
- opt := func (i * action.Install ) error { i .Description = "Test Description" ; return nil }
139
+ opt := func (i * action.Install ) error { i .Description = mockTestDesc ; return nil }
138
140
rel , err = ac .Install (obj .GetName (), obj .GetNamespace (), & chrt , vals , opt )
139
141
Expect (err ).To (BeNil ())
140
142
Expect (rel ).NotTo (BeNil ())
@@ -182,7 +184,7 @@ var _ = Describe("ActionClient", func() {
182
184
)
183
185
BeforeEach (func () {
184
186
var err error
185
- opt := func (i * action.Install ) error { i .Description = "Test Description" ; return nil }
187
+ opt := func (i * action.Install ) error { i .Description = mockTestDesc ; return nil }
186
188
installedRelease , err = ac .Install (obj .GetName (), obj .GetNamespace (), & chrt , vals , opt )
187
189
Expect (err ).To (BeNil ())
188
190
Expect (installedRelease ).NotTo (BeNil ())
@@ -246,7 +248,7 @@ var _ = Describe("ActionClient", func() {
246
248
err error
247
249
)
248
250
By ("upgrading the release" , func () {
249
- opt := func (u * action.Upgrade ) error { u .Description = "Test Description" ; return nil }
251
+ opt := func (u * action.Upgrade ) error { u .Description = mockTestDesc ; return nil }
250
252
rel , err = ac .Upgrade (obj .GetName (), obj .GetNamespace (), & chrt , vals , opt )
251
253
Expect (err ).To (BeNil ())
252
254
Expect (rel ).NotTo (BeNil ())
@@ -281,7 +283,7 @@ var _ = Describe("ActionClient", func() {
281
283
err error
282
284
)
283
285
By ("uninstalling the release" , func () {
284
- opt := func (i * action.Uninstall ) error { i .Description = "Test Description" ; return nil }
286
+ opt := func (i * action.Uninstall ) error { i .Description = mockTestDesc ; return nil }
285
287
resp , err = ac .Uninstall (obj .GetName (), opt )
286
288
Expect (err ).To (BeNil ())
287
289
Expect (resp ).NotTo (BeNil ())
@@ -568,7 +570,7 @@ func verifyRelease(cl client.Client, ns string, rel *release.Release) {
568
570
})
569
571
570
572
By ("verifying release status description option was honored" , func () {
571
- Expect (rel .Info .Description ).To (Equal ("Test Description" ))
573
+ Expect (rel .Info .Description ).To (Equal (mockTestDesc ))
572
574
})
573
575
574
576
By ("verifying the release resources exist" , func () {
@@ -592,7 +594,7 @@ func verifyNoRelease(cl client.Client, ns string, name string, rel *release.Rele
592
594
})
593
595
By ("verifying the uninstall description option was honored" , func () {
594
596
if rel != nil {
595
- Expect (rel .Info .Description ).To (Equal ("Test Description" ))
597
+ Expect (rel .Info .Description ).To (Equal (mockTestDesc ))
596
598
}
597
599
})
598
600
By ("verifying all release resources are removed" , func () {
0 commit comments