diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-01-14 09:53:02 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-01-14 10:51:59 +0100 |
commit | cf1f3191d2be691b482ac86f9476c180f608ddbe (patch) | |
tree | 16b5c74883be69aef8e567bc089b3656b6fb14fa /pkg/network/network_test.go | |
parent | a1028697465029f3e7b100de843eb7e5e2948246 (diff) | |
download | podman-cf1f3191d2be691b482ac86f9476c180f608ddbe.tar.gz podman-cf1f3191d2be691b482ac86f9476c180f608ddbe.tar.bz2 podman-cf1f3191d2be691b482ac86f9476c180f608ddbe.zip |
make lint: include unit tests
Include the unit tests (i.e., _test.go files) for linting to make the
tests more robust and enforce the linters' coding styles etc.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/network/network_test.go')
-rw-r--r-- | pkg/network/network_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/network/network_test.go b/pkg/network/network_test.go index dbffc33ad..1969e792c 100644 --- a/pkg/network/network_test.go +++ b/pkg/network/network_test.go @@ -25,9 +25,10 @@ func Test_networkIntersect(t *testing.T) { {"Two 24s", args{n1: parseCIDR("192.168.1.0/24"), n2: parseCIDR("192.168.2.0/24")}, false}, } for _, tt := range tests { + test := tt t.Run(tt.name, func(t *testing.T) { - if got := networkIntersect(tt.args.n1, tt.args.n2); got != tt.want { - t.Errorf("networkIntersect() = %v, want %v", got, tt.want) + if got := networkIntersect(test.args.n1, test.args.n2); got != test.want { + t.Errorf("networkIntersect() = %v, want %v", got, test.want) } }) } |