Merge branch v2.11 into v3.4
This commit is contained in:
commit
bd4bfd8919
110 changed files with 493 additions and 494 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package docker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -421,7 +420,7 @@ func TestDynConfBuilder_DefaultRule(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
configuration := builder.build(context.Background(), test.containers)
|
||||
configuration := builder.build(t.Context(), test.containers)
|
||||
|
||||
assert.Equal(t, test.expected, configuration)
|
||||
})
|
||||
|
|
@ -3929,7 +3928,7 @@ func TestDynConfBuilder_build(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
configuration := builder.build(context.Background(), test.containers)
|
||||
configuration := builder.build(t.Context(), test.containers)
|
||||
|
||||
assert.Equal(t, test.expected, configuration)
|
||||
})
|
||||
|
|
@ -4101,7 +4100,7 @@ func TestDynConfBuilder_getIPPort_docker(t *testing.T) {
|
|||
UseBindPortIP: true,
|
||||
}, nil, false)
|
||||
|
||||
actualIP, actualPort, actualError := builder.getIPPort(context.Background(), dData, test.serverPort)
|
||||
actualIP, actualPort, actualError := builder.getIPPort(t.Context(), dData, test.serverPort)
|
||||
if test.expected.error {
|
||||
require.Error(t, actualError)
|
||||
} else {
|
||||
|
|
@ -4219,7 +4218,7 @@ func TestDynConfBuilder_getIPAddress_docker(t *testing.T) {
|
|||
|
||||
builder := NewDynConfBuilder(conf, nil, false)
|
||||
|
||||
actual := builder.getIPAddress(context.Background(), dData)
|
||||
actual := builder.getIPAddress(t.Context(), dData)
|
||||
assert.Equal(t, test.expected, actual)
|
||||
})
|
||||
}
|
||||
|
|
@ -4278,11 +4277,11 @@ func TestDynConfBuilder_getIPAddress_swarm(t *testing.T) {
|
|||
var p SwarmProvider
|
||||
require.NoError(t, p.Init())
|
||||
|
||||
dData, err := p.parseService(context.Background(), test.service, test.networks)
|
||||
dData, err := p.parseService(t.Context(), test.service, test.networks)
|
||||
require.NoError(t, err)
|
||||
|
||||
builder := NewDynConfBuilder(p.Shared, nil, false)
|
||||
actual := builder.getIPAddress(context.Background(), dData)
|
||||
actual := builder.getIPAddress(t.Context(), dData)
|
||||
assert.Equal(t, test.expected, actual)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue