summaryrefslogtreecommitdiff
path: root/pkg/network/subnet_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-14 15:47:23 +0100
committerGitHub <noreply@github.com>2020-01-14 15:47:23 +0100
commit564bd693cae4e8a870be7a7860ef673e793f6358 (patch)
treeab395cdeab8814c2d3b426cf5215246057ff87ba /pkg/network/subnet_test.go
parent3961882ffe9e1cb83adab483caf39a0db5b4430a (diff)
parent460887edca95605ee203893448d98986a2521e2d (diff)
downloadpodman-564bd693cae4e8a870be7a7860ef673e793f6358.tar.gz
podman-564bd693cae4e8a870be7a7860ef673e793f6358.tar.bz2
podman-564bd693cae4e8a870be7a7860ef673e793f6358.zip
Merge pull request #4858 from vrothberg/enable-linters
make lint: extend checks
Diffstat (limited to 'pkg/network/subnet_test.go')
-rw-r--r--pkg/network/subnet_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkg/network/subnet_test.go b/pkg/network/subnet_test.go
index 6ecfd2d17..917c3be88 100644
--- a/pkg/network/subnet_test.go
+++ b/pkg/network/subnet_test.go
@@ -20,14 +20,15 @@ func TestNextSubnet(t *testing.T) {
{"class c", args{subnet: parseCIDR("192.168.1.0/24")}, parseCIDR("192.168.2.0/24"), false},
}
for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- got, err := NextSubnet(tt.args.subnet)
- if (err != nil) != tt.wantErr {
- t.Errorf("NextSubnet() error = %v, wantErr %v", err, tt.wantErr)
+ test := tt
+ t.Run(test.name, func(t *testing.T) {
+ got, err := NextSubnet(test.args.subnet)
+ if (err != nil) != test.wantErr {
+ t.Errorf("NextSubnet() error = %v, wantErr %v", err, test.wantErr)
return
}
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("NextSubnet() got = %v, want %v", got, tt.want)
+ if !reflect.DeepEqual(got, test.want) {
+ t.Errorf("NextSubnet() got = %v, want %v", got, test.want)
}
})
}