15
15
package v1
16
16
17
17
import (
18
- "fmt"
19
18
. "github.com/onsi/ginkgo"
20
19
. "github.com/onsi/gomega"
21
20
"github.com/spf13/pflag"
@@ -36,15 +35,27 @@ var _ = Describe("v1", func() {
36
35
}
37
36
38
37
Describe ("UpdateResource" , func () {
39
- testAPIOptions := & createAPIOptions {}
40
- testAPIOptions .UpdateResource (& testResource )
38
+ testAPIOptions := & createAPIOptions {
39
+ CRDVersion : "testVersion" ,
40
+ Namespaced : true ,
41
+ }
42
+ updateTestResource := resource.Resource {}
43
+ testAPIOptions .UpdateResource (& updateTestResource )
44
+
45
+ It ("verify that resource API's CRDVersion was set" , func () {
46
+ Expect (updateTestResource .API .CRDVersion , testAPIOptions .CRDVersion )
47
+ })
48
+
49
+ It ("verify that resource API's Namespaced was set" , func () {
50
+ Expect (updateTestResource .API .Namespaced , testAPIOptions .Namespaced )
51
+ })
41
52
42
53
It ("verify that resource path is an empty string" , func () {
43
- Expect (testResource .Path , "" )
54
+ Expect (updateTestResource .Path , "" )
44
55
})
45
56
46
57
It ("verify that resource controller is false" , func () {
47
- Expect (testResource .Controller ).To (BeFalse ())
58
+ Expect (updateTestResource .Controller ).To (BeFalse ())
48
59
})
49
60
})
50
61
@@ -79,9 +90,8 @@ var _ = Describe("v1", func() {
79
90
})
80
91
81
92
Describe ("Run" , func () {
82
- testFileSystem := machinery.Filesystem {}
83
93
It ("should return nil" , func () {
84
- Expect (testAPISubcommand .Run (testFileSystem )).To (BeNil ())
94
+ Expect (testAPISubcommand .Run (machinery. Filesystem {} )).To (BeNil ())
85
95
})
86
96
})
87
97
@@ -115,7 +125,6 @@ var _ = Describe("v1", func() {
115
125
})
116
126
117
127
It ("should error by group name" , func () {
118
- fmt .Println ()
119
128
Expect (groupErr ).To (HaveOccurred ())
120
129
})
121
130
0 commit comments