mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
unused: ignore false positives
integration/build/build_session_test.go:92:6: func `testBuildWithSession` is unused (unused) func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonHost string, dir, dockerfile string) (outStr string) { ^ integration/container/checkpoint_test.go:23:6: func `containerExec` is unused (unused) func containerExec(t *testing.T, client client.APIClient, cID string, cmd []string) { ^ integration/network/service_test.go:295:6: func `swarmIngressReady` is unused (unused) func swarmIngressReady(client client.NetworkAPIClient) func(log poll.LogT) poll.Result { ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b4c0c7c076
commit
7c91fd4240
3 changed files with 3 additions and 0 deletions
|
@ -89,6 +89,7 @@ func TestBuildWithSession(t *testing.T) {
|
||||||
assert.Check(t, is.Equal(du.BuilderSize, int64(0)))
|
assert.Check(t, is.Equal(du.BuilderSize, int64(0)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:unused // false positive: linter detects this as "unused"
|
||||||
func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonHost string, dir, dockerfile string) (outStr string) {
|
func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonHost string, dir, dockerfile string) (outStr string) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
sess, err := session.NewSession(ctx, "foo1", "foo")
|
sess, err := session.NewSession(ctx, "foo1", "foo")
|
||||||
|
|
|
@ -20,6 +20,7 @@ import (
|
||||||
"gotest.tools/v3/skip"
|
"gotest.tools/v3/skip"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//nolint:unused // false positive: linter detects this as "unused"
|
||||||
func containerExec(t *testing.T, client client.APIClient, cID string, cmd []string) {
|
func containerExec(t *testing.T, client client.APIClient, cID string, cmd []string) {
|
||||||
t.Logf("Exec: %s", cmd)
|
t.Logf("Exec: %s", cmd)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
|
@ -292,6 +292,7 @@ func TestServiceRemoveKeepsIngressNetwork(t *testing.T) {
|
||||||
assert.Assert(t, ok, "ingress-sbox not present in ingress network")
|
assert.Assert(t, ok, "ingress-sbox not present in ingress network")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:unused // for some reason, the "unused" linter marks this function as "unused"
|
||||||
func swarmIngressReady(client client.NetworkAPIClient) func(log poll.LogT) poll.Result {
|
func swarmIngressReady(client client.NetworkAPIClient) func(log poll.LogT) poll.Result {
|
||||||
return func(log poll.LogT) poll.Result {
|
return func(log poll.LogT) poll.Result {
|
||||||
netInfo, err := client.NetworkInspect(context.Background(), ingressNet, types.NetworkInspectOptions{
|
netInfo, err := client.NetworkInspect(context.Background(), ingressNet, types.NetworkInspectOptions{
|
||||||
|
|
Loading…
Reference in a new issue