@@ -784,7 +784,7 @@ func (p *PodmanTestIntegration) RunTopContainer(name string) *PodmanSessionInteg
784784// runs top. If the name passed != "", it will have a name, command args can also be passed in
785785func (p * PodmanTestIntegration ) RunTopContainerWithArgs (name string , args []string ) * PodmanSessionIntegration {
786786 // In proxy environment, some tests need to the --http-proxy=false option (#16684)
787- var podmanArgs = []string {"run" , "--http-proxy=false" }
787+ podmanArgs : = []string {"run" , "--http-proxy=false" }
788788 if name != "" {
789789 podmanArgs = append (podmanArgs , "--name" , name )
790790 }
@@ -803,7 +803,7 @@ func (p *PodmanTestIntegration) RunTopContainerWithArgs(name string, args []stri
803803// RunLsContainer runs a simple container in the background that
804804// simply runs ls. If the name passed != "", it will have a name
805805func (p * PodmanTestIntegration ) RunLsContainer (name string ) (* PodmanSessionIntegration , int , string ) {
806- var podmanArgs = []string {"run" }
806+ podmanArgs : = []string {"run" }
807807 if name != "" {
808808 podmanArgs = append (podmanArgs , "--name" , name )
809809 }
@@ -822,7 +822,7 @@ func (p *PodmanTestIntegration) RunLsContainer(name string) (*PodmanSessionInteg
822822
823823// RunNginxWithHealthCheck runs the alpine nginx container with an optional name and adds a healthcheck into it
824824func (p * PodmanTestIntegration ) RunNginxWithHealthCheck (name string ) (* PodmanSessionIntegration , string ) {
825- var podmanArgs = []string {"run" }
825+ podmanArgs : = []string {"run" }
826826 if name != "" {
827827 podmanArgs = append (podmanArgs , "--name" , name )
828828 }
@@ -835,7 +835,7 @@ func (p *PodmanTestIntegration) RunNginxWithHealthCheck(name string) (*PodmanSes
835835
836836// RunContainerWithNetworkTest runs the fedoraMinimal curl with the specified network mode.
837837func (p * PodmanTestIntegration ) RunContainerWithNetworkTest (mode string ) * PodmanSessionIntegration {
838- var podmanArgs = []string {"run" }
838+ podmanArgs : = []string {"run" }
839839 if mode != "" {
840840 podmanArgs = append (podmanArgs , "--network" , mode )
841841 }
@@ -845,7 +845,7 @@ func (p *PodmanTestIntegration) RunContainerWithNetworkTest(mode string) *Podman
845845}
846846
847847func (p * PodmanTestIntegration ) RunLsContainerInPod (name , pod string ) (* PodmanSessionIntegration , int , string ) {
848- var podmanArgs = []string {"run" , "--pod" , pod }
848+ podmanArgs : = []string {"run" , "--pod" , pod }
849849 if name != "" {
850850 podmanArgs = append (podmanArgs , "--name" , name )
851851 }
@@ -1006,7 +1006,7 @@ func (s *PodmanSessionIntegration) InspectPodArrToJSON() []define.InspectPodData
10061006// CreatePod creates a pod with no infra container
10071007// it optionally takes a pod name
10081008func (p * PodmanTestIntegration ) CreatePod (options map [string ][]string ) (* PodmanSessionIntegration , int , string ) {
1009- var args = []string {"pod" , "create" , "--infra=false" , "--share" , "" }
1009+ args : = []string {"pod" , "create" , "--infra=false" , "--share" , "" }
10101010 for k , values := range options {
10111011 for _ , v := range values {
10121012 args = append (args , k + "=" + v )
@@ -1019,7 +1019,7 @@ func (p *PodmanTestIntegration) CreatePod(options map[string][]string) (*PodmanS
10191019}
10201020
10211021func (p * PodmanTestIntegration ) CreateVolume (options map [string ][]string ) (* PodmanSessionIntegration , int , string ) {
1022- var args = []string {"volume" , "create" }
1022+ args : = []string {"volume" , "create" }
10231023 for k , values := range options {
10241024 for _ , v := range values {
10251025 args = append (args , k + "=" + v )
@@ -1182,17 +1182,6 @@ func isRootless() bool {
11821182 return os .Geteuid () != 0
11831183}
11841184
1185- func isCgroupsV1 () bool {
1186- return ! CGROUPSV2
1187- }
1188-
1189- func SkipIfCgroupV1 (reason string ) {
1190- checkReason (reason )
1191- if isCgroupsV1 () {
1192- Skip (reason )
1193- }
1194- }
1195-
11961185func SkipIfCgroupV2 (reason string ) {
11971186 checkReason (reason )
11981187 if CGROUPSV2 {
@@ -1382,8 +1371,10 @@ func (p *PodmanTestIntegration) makeOptions(args []string, options PodmanExecOpt
13821371
13831372 podmanOptions = append (podmanOptions , strings .Split (p .StorageOptions , " " )... )
13841373 if ! options .NoCache {
1385- cacheOptions := []string {"--storage-opt" ,
1386- fmt .Sprintf ("%s.imagestore=%s" , p .PodmanTest .ImageCacheFS , p .PodmanTest .ImageCacheDir )}
1374+ cacheOptions := []string {
1375+ "--storage-opt" ,
1376+ fmt .Sprintf ("%s.imagestore=%s" , p .PodmanTest .ImageCacheFS , p .PodmanTest .ImageCacheDir ),
1377+ }
13871378 podmanOptions = append (cacheOptions , podmanOptions ... )
13881379 }
13891380 podmanOptions = append (podmanOptions , args ... )
0 commit comments