mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
enable unparam linter
The unparam linter is useful to detect unused function parameters and return values. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -241,7 +241,6 @@ func Test_ocicniPortsToNetTypesPorts(t *testing.T) {
|
||||
func Test_resultToBasicNetworkConfig(t *testing.T) {
|
||||
testCases := []struct {
|
||||
description string
|
||||
expectError bool
|
||||
inputResult types.StatusBlock
|
||||
expectedNetworkConfig define.InspectBasicNetworkConfig
|
||||
}{
|
||||
@ -431,15 +430,7 @@ func Test_resultToBasicNetworkConfig(t *testing.T) {
|
||||
tc := tcl
|
||||
t.Run(tc.description, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
actualNetworkConfig, err := resultToBasicNetworkConfig(tc.inputResult)
|
||||
|
||||
if tc.expectError && err == nil {
|
||||
t.Fatalf("Expected error didn't happen")
|
||||
}
|
||||
|
||||
if !tc.expectError && err != nil {
|
||||
t.Fatalf("Unexpected error happened: %v", err)
|
||||
}
|
||||
actualNetworkConfig := resultToBasicNetworkConfig(tc.inputResult)
|
||||
|
||||
if !reflect.DeepEqual(tc.expectedNetworkConfig, actualNetworkConfig) {
|
||||
t.Fatalf(
|
||||
|
Reference in New Issue
Block a user