enable gofumpt formatter

Based on our discussion gofumpt won the vote so use that one via
golangci-lint.

https://github.com/containers/podman/discussions/27291

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-11-11 12:12:42 +01:00
parent 2555b8b413
commit 5c1ed12d8d
389 changed files with 1228 additions and 1600 deletions

View File

@@ -4,13 +4,12 @@ package generate
import (
"net"
"testing"
"github.com/containers/podman/v6/pkg/specgen"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.podman.io/common/libnetwork/types"
"testing"
)
var (
@@ -32,11 +31,14 @@ func TestMapSpecCopyPodSpecToInfraContainerSpec(t *testing.T) {
infraImage := "someimage"
conmonPidFile := "/var/run/conmon.pid"
podSpec := specgen.PodSpecGenerator{
PodBasicConfig: specgen.PodBasicConfig{InfraCommand: infraCommand, InfraImage: infraImage,
InfraConmonPidFile: conmonPidFile},
PodBasicConfig: specgen.PodBasicConfig{
InfraCommand: infraCommand, InfraImage: infraImage,
InfraConmonPidFile: conmonPidFile,
},
PodNetworkConfig: specgen.PodNetworkConfig{
PortMappings: portMappings, HostAdd: addedHosts, DNSServer: dnsServers, DNSOption: dnsOptions, DNSSearch: dnsSearch,
Networks: networks, NoManageResolvConf: true, NoManageHosts: true},
Networks: networks, NoManageResolvConf: true, NoManageHosts: true,
},
PodCgroupConfig: specgen.PodCgroupConfig{},
PodResourceConfig: specgen.PodResourceConfig{},
PodStorageConfig: specgen.PodStorageConfig{},
@@ -114,7 +116,8 @@ func TestMapSpecNetworkOptions(t *testing.T) {
name: "Private",
podSpec: createPodSpec(specgen.Private),
expectedNSMode: specgen.Private,
}, {
},
{
name: "Host",
podSpec: createPodSpec(specgen.Host),
expectedNSMode: specgen.Host,
@@ -123,7 +126,8 @@ func TestMapSpecNetworkOptions(t *testing.T) {
name: "Host but with port mappings",
podSpec: createPodSpecWithPortMapping(specgen.Host),
mustError: true,
}, {
},
{
name: "Host but with networks",
podSpec: createPodSpecWithNetworks(specgen.Host),
mustError: true,
@@ -170,7 +174,8 @@ func TestMapSpecNetworkOptions(t *testing.T) {
name: "FromContainer",
podSpec: createPodSpec(specgen.FromContainer),
mustError: true,
}, {
},
{
name: "FromPod",
podSpec: createPodSpec(specgen.FromPod),
mustError: true,