@@ -78,10 +78,10 @@ func Test_RotateLogs_LCOW(t *testing.T) {
7878 log := filepath .Join (dir , "log.txt" )
7979 logArchive := filepath .Join (dir , "log-archive.txt" )
8080
81- pullRequiredLcowImages (t , []string {imageLcowK8sPause , image })
81+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , image })
8282 logrus .SetLevel (logrus .DebugLevel )
8383
84- sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
84+ sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler )
8585
8686 request := & runtime.CreateContainerRequest {
8787 Config : & runtime.ContainerConfig {
@@ -136,14 +136,14 @@ func Test_RotateLogs_LCOW(t *testing.T) {
136136func Test_RunContainer_Events_LCOW (t * testing.T ) {
137137 requireFeatures (t , featureLCOW )
138138
139- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
139+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
140140 client := newTestRuntimeClient (t )
141141
142142 podctx , podcancel := context .WithCancel (context .Background ())
143143 defer podcancel ()
144144 targetNamespace := "k8s.io"
145145
146- sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
146+ sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler )
147147
148148 podID := runPodSandbox (t , client , podctx , sandboxRequest )
149149 defer removePodSandbox (t , client , podctx , podID )
@@ -207,12 +207,12 @@ func Test_RunContainer_Events_LCOW(t *testing.T) {
207207func Test_RunContainer_ForksThenExits_ShowsAsExited_LCOW (t * testing.T ) {
208208 requireFeatures (t , featureLCOW )
209209
210- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
210+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
211211 client := newTestRuntimeClient (t )
212212 ctx , cancel := context .WithTimeout (context .Background (), 20 * time .Second )
213213 defer cancel ()
214214
215- podRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
215+ podRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler )
216216 podID := runPodSandbox (t , client , ctx , podRequest )
217217 defer removePodSandbox (t , client , ctx , podID )
218218 defer stopPodSandbox (t , client , ctx , podID )
@@ -258,7 +258,7 @@ func Test_RunContainer_ForksThenExits_ShowsAsExited_LCOW(t *testing.T) {
258258func Test_RunContainer_ZeroVPMEM_LCOW (t * testing.T ) {
259259 requireFeatures (t , featureLCOW )
260260
261- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
261+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
262262
263263 client := newTestRuntimeClient (t )
264264 ctx , cancel := context .WithCancel (context .Background ())
@@ -267,10 +267,10 @@ func Test_RunContainer_ZeroVPMEM_LCOW(t *testing.T) {
267267 sandboxRequest := getRunPodSandboxRequest (
268268 t ,
269269 lcowRuntimeHandler ,
270- map [string ]string {
270+ WithSandboxAnnotations ( map [string ]string {
271271 oci .AnnotationPreferredRootFSType : "initrd" ,
272272 oci .AnnotationVPMemCount : "0" ,
273- },
273+ }) ,
274274 )
275275
276276 podID := runPodSandbox (t , client , ctx , sandboxRequest )
@@ -300,7 +300,7 @@ func Test_RunContainer_ZeroVPMEM_LCOW(t *testing.T) {
300300func Test_RunContainer_ZeroVPMEM_Multiple_LCOW (t * testing.T ) {
301301 requireFeatures (t , featureLCOW )
302302
303- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
303+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
304304
305305 client := newTestRuntimeClient (t )
306306 ctx , cancel := context .WithCancel (context .Background ())
@@ -309,10 +309,10 @@ func Test_RunContainer_ZeroVPMEM_Multiple_LCOW(t *testing.T) {
309309 sandboxRequest := getRunPodSandboxRequest (
310310 t ,
311311 lcowRuntimeHandler ,
312- map [string ]string {
312+ WithSandboxAnnotations ( map [string ]string {
313313 oci .AnnotationPreferredRootFSType : "initrd" ,
314314 oci .AnnotationVPMemCount : "0" ,
315- },
315+ }) ,
316316 )
317317
318318 podID := runPodSandbox (t , client , ctx , sandboxRequest )
@@ -357,7 +357,7 @@ func Test_RunContainer_GMSA_WCOW_Process(t *testing.T) {
357357 ctx , cancel := context .WithCancel (context .Background ())
358358 defer cancel ()
359359
360- sandboxRequest := getRunPodSandboxRequest (t , wcowProcessRuntimeHandler , nil )
360+ sandboxRequest := getRunPodSandboxRequest (t , wcowProcessRuntimeHandler )
361361
362362 podID := runPodSandbox (t , client , ctx , sandboxRequest )
363363 defer removePodSandbox (t , client , ctx , podID )
@@ -421,7 +421,7 @@ func Test_RunContainer_GMSA_WCOW_Hypervisor(t *testing.T) {
421421 ctx , cancel := context .WithCancel (context .Background ())
422422 defer cancel ()
423423
424- sandboxRequest := getRunPodSandboxRequest (t , wcowHypervisorRuntimeHandler , nil )
424+ sandboxRequest := getRunPodSandboxRequest (t , wcowHypervisorRuntimeHandler )
425425
426426 podID := runPodSandbox (t , client , ctx , sandboxRequest )
427427 defer removePodSandbox (t , client , ctx , podID )
@@ -479,13 +479,13 @@ func Test_RunContainer_GMSA_WCOW_Hypervisor(t *testing.T) {
479479func Test_RunContainer_SandboxDevice_LCOW (t * testing.T ) {
480480 requireFeatures (t , featureLCOW )
481481
482- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
482+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
483483
484484 client := newTestRuntimeClient (t )
485485 ctx , cancel := context .WithCancel (context .Background ())
486486 defer cancel ()
487487
488- sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
488+ sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler )
489489 sandboxRequest .Config .Linux = & runtime.LinuxPodSandboxConfig {
490490 SecurityContext : & runtime.LinuxSandboxSecurityContext {
491491 Privileged : true ,
@@ -549,9 +549,9 @@ func Test_RunContainer_NonDefault_User(t *testing.T) {
549549 ctx , cancel := context .WithCancel (context .Background ())
550550 defer cancel ()
551551
552- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
552+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
553553
554- podReq := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
554+ podReq := getRunPodSandboxRequest (t , lcowRuntimeHandler )
555555 podID := runPodSandbox (t , client , ctx , podReq )
556556 defer removePodSandbox (t , client , ctx , podID )
557557 defer stopPodSandbox (t , client , ctx , podID )
@@ -605,13 +605,13 @@ func Test_RunContainer_NonDefault_User(t *testing.T) {
605605func Test_RunContainer_ShareScratch_LCOW (t * testing.T ) {
606606 requireFeatures (t , featureLCOW )
607607
608- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
608+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
609609
610610 client := newTestRuntimeClient (t )
611611 ctx , cancel := context .WithCancel (context .Background ())
612612 defer cancel ()
613613
614- sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
614+ sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler )
615615
616616 podID := runPodSandbox (t , client , ctx , sandboxRequest )
617617 defer removePodSandbox (t , client , ctx , podID )
@@ -695,13 +695,13 @@ func findOverlaySize(t *testing.T, ctx context.Context, client runtime.RuntimeSe
695695func Test_RunContainer_ShareScratch_CheckSize_LCOW (t * testing.T ) {
696696 requireFeatures (t , featureLCOW )
697697
698- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
698+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
699699
700700 client := newTestRuntimeClient (t )
701701 ctx , cancel := context .WithCancel (context .Background ())
702702 defer cancel ()
703703
704- sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
704+ sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler )
705705
706706 podID := runPodSandbox (t , client , ctx , sandboxRequest )
707707 defer removePodSandbox (t , client , ctx , podID )
@@ -779,13 +779,13 @@ func Test_RunContainer_ShareScratch_CheckSize_LCOW(t *testing.T) {
779779func Test_CreateContainer_DevShmSize (t * testing.T ) {
780780 requireFeatures (t , featureLCOW )
781781
782- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
782+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
783783
784784 client := newTestRuntimeClient (t )
785785 ctx , cancel := context .WithCancel (context .Background ())
786786 defer cancel ()
787787
788- podReq := getRunPodSandboxRequest (t , lcowRuntimeHandler , nil )
788+ podReq := getRunPodSandboxRequest (t , lcowRuntimeHandler )
789789 podID := runPodSandbox (t , client , ctx , podReq )
790790 defer removePodSandbox (t , client , ctx , podID )
791791
@@ -834,14 +834,14 @@ func Test_CreateContainer_HugePageMount_LCOW(t *testing.T) {
834834 ctx , cancel := context .WithCancel (context .Background ())
835835 defer cancel ()
836836
837- pullRequiredLcowImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
837+ pullRequiredLCOWImages (t , []string {imageLcowK8sPause , imageLcowAlpine })
838838
839839 annotations := map [string ]string {
840840 oci .AnnotationFullyPhysicallyBacked : "true" ,
841841 oci .AnnotationMemorySizeInMB : "2048" ,
842842 oci .AnnotationKernelBootOptions : "hugepagesz=2M hugepages=10" ,
843843 }
844- sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , annotations )
844+ sandboxRequest := getRunPodSandboxRequest (t , lcowRuntimeHandler , WithSandboxAnnotations ( annotations ) )
845845
846846 podID := runPodSandbox (t , client , ctx , sandboxRequest )
847847 defer removePodSandbox (t , client , ctx , podID )
0 commit comments