@@ -208,6 +208,12 @@ var _ = Describe("MakeJobTemplate", func() {
208
208
209
209
gomock .InOrder (
210
210
helper .EXPECT ().GetRelevantSign (mod .Spec , km , kernelVersion ).Return (km .Sign , nil ),
211
+ clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : "builder" , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
212
+ func (_ interface {}, _ interface {}, svcaccnt * v1.ServiceAccount , _ ... ctrlclient.GetOption ) error {
213
+ svcaccnt .Secrets = []v1.ObjectReference {}
214
+ return nil
215
+ },
216
+ ),
211
217
clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : km .Sign .KeySecret .Name , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
212
218
func (_ interface {}, _ interface {}, secret * v1.Secret , _ ... ctrlclient.GetOption ) error {
213
219
secret .Data = privateSignData
@@ -255,6 +261,12 @@ var _ = Describe("MakeJobTemplate", func() {
255
261
256
262
gomock .InOrder (
257
263
helper .EXPECT ().GetRelevantSign (mod .Spec , km , kernelVersion ).Return (km .Sign , nil ),
264
+ clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : "builder" , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
265
+ func (_ interface {}, _ interface {}, svcaccnt * v1.ServiceAccount , _ ... ctrlclient.GetOption ) error {
266
+ svcaccnt .Secrets = []v1.ObjectReference {}
267
+ return nil
268
+ },
269
+ ),
258
270
clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : km .Sign .KeySecret .Name , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
259
271
func (_ interface {}, _ interface {}, secret * v1.Secret , _ ... ctrlclient.GetOption ) error {
260
272
secret .Data = privateSignData
@@ -317,15 +329,21 @@ var _ = Describe("MakeJobTemplate", func() {
317
329
CertSecret : & v1.LocalObjectReference {Name : "securebootcert" },
318
330
},
319
331
}
320
-
321
332
gomock .InOrder (
322
333
helper .EXPECT ().GetRelevantSign (mod .Spec , km , kernelVersion ).Return (km .Sign , nil ),
334
+ clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : "builder" , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
335
+ func (_ interface {}, _ interface {}, svcaccnt * v1.ServiceAccount , _ ... ctrlclient.GetOption ) error {
336
+ svcaccnt .Secrets = []v1.ObjectReference {}
337
+ return nil
338
+ },
339
+ ),
323
340
clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : km .Sign .KeySecret .Name , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
324
341
func (_ interface {}, _ interface {}, secret * v1.Secret , _ ... ctrlclient.GetOption ) error {
325
342
secret .Data = privateSignData
326
343
return nil
327
344
},
328
345
),
346
+
329
347
clnt .EXPECT ().Get (ctx , types.NamespacedName {Name : km .Sign .CertSecret .Name , Namespace : mod .Namespace }, gomock .Any ()).DoAndReturn (
330
348
func (_ interface {}, _ interface {}, secret * v1.Secret , _ ... ctrlclient.GetOption ) error {
331
349
secret .Data = publicSignData
0 commit comments