@@ -60,3 +60,30 @@ var _ = Describe("ListOptions", func() {
60
60
Expect (newListOpts ).To (Equal (o ))
61
61
})
62
62
})
63
+
64
+ var _ = Describe ("CreateOptions" , func () {
65
+ It ("Should set DryRun" , func () {
66
+ o := & client.CreateOptions {DryRun : []string {"Hello" , "Theodore" }}
67
+ newCreatOpts := & client.CreateOptions {}
68
+ o .ApplyToCreate (newCreatOpts )
69
+ Expect (newCreatOpts ).To (Equal (o ))
70
+ })
71
+ It ("Should set FieldManager" , func () {
72
+ o := & client.CreateOptions {FieldManager : "FieldManager" }
73
+ newCreatOpts := & client.CreateOptions {}
74
+ o .ApplyToCreate (newCreatOpts )
75
+ Expect (newCreatOpts ).To (Equal (o ))
76
+ })
77
+ It ("Should set Raw" , func () {
78
+ o := & client.CreateOptions {Raw : & metav1.CreateOptions {DryRun : []string {"Bye" , "Theodore" }}}
79
+ newCreatOpts := & client.CreateOptions {}
80
+ o .ApplyToCreate (newCreatOpts )
81
+ Expect (newCreatOpts ).To (Equal (o ))
82
+ })
83
+ It ("Should not set anything" , func () {
84
+ o := & client.CreateOptions {}
85
+ newCreatOpts := & client.CreateOptions {}
86
+ o .ApplyToCreate (newCreatOpts )
87
+ Expect (newCreatOpts ).To (Equal (o ))
88
+ })
89
+ })
0 commit comments