mirror of https://github.com/docker/cli.git
gofmt compose loader test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
740919cc7f
commit
5ef0fa10de
|
@ -1024,18 +1024,18 @@ func TestMergeUlimitsConfig(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
base := map[string]*types.UlimitsConfig{
|
base := map[string]*types.UlimitsConfig{
|
||||||
"override-single": &types.UlimitsConfig{Single: 100},
|
"override-single": {Single: 100},
|
||||||
"override-single-with-soft-hard": &types.UlimitsConfig{Single: 200},
|
"override-single-with-soft-hard": {Single: 200},
|
||||||
"override-soft-hard": &types.UlimitsConfig{Soft: 300, Hard: 301},
|
"override-soft-hard": {Soft: 300, Hard: 301},
|
||||||
"override-soft-hard-with-single": &types.UlimitsConfig{Soft: 400, Hard: 401},
|
"override-soft-hard-with-single": {Soft: 400, Hard: 401},
|
||||||
"dont-override": &types.UlimitsConfig{Single: 500},
|
"dont-override": {Single: 500},
|
||||||
}
|
}
|
||||||
override := map[string]*types.UlimitsConfig{
|
override := map[string]*types.UlimitsConfig{
|
||||||
"override-single": &types.UlimitsConfig{Single: 110},
|
"override-single": {Single: 110},
|
||||||
"override-single-with-soft-hard": &types.UlimitsConfig{Soft: 210, Hard: 211},
|
"override-single-with-soft-hard": {Soft: 210, Hard: 211},
|
||||||
"override-soft-hard": &types.UlimitsConfig{Soft: 310, Hard: 311},
|
"override-soft-hard": {Soft: 310, Hard: 311},
|
||||||
"override-soft-hard-with-single": &types.UlimitsConfig{Single: 410},
|
"override-soft-hard-with-single": {Single: 410},
|
||||||
"add": &types.UlimitsConfig{Single: 610},
|
"add": {Single: 610},
|
||||||
}
|
}
|
||||||
err := mergo.Merge(&base, &override, mergo.WithOverride, mergo.WithTransformers(specials))
|
err := mergo.Merge(&base, &override, mergo.WithOverride, mergo.WithTransformers(specials))
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
@ -1043,12 +1043,12 @@ func TestMergeUlimitsConfig(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
base,
|
base,
|
||||||
map[string]*types.UlimitsConfig{
|
map[string]*types.UlimitsConfig{
|
||||||
"override-single": &types.UlimitsConfig{Single: 110},
|
"override-single": {Single: 110},
|
||||||
"override-single-with-soft-hard": &types.UlimitsConfig{Soft: 210, Hard: 211},
|
"override-single-with-soft-hard": {Soft: 210, Hard: 211},
|
||||||
"override-soft-hard": &types.UlimitsConfig{Soft: 310, Hard: 311},
|
"override-soft-hard": {Soft: 310, Hard: 311},
|
||||||
"override-soft-hard-with-single": &types.UlimitsConfig{Single: 410},
|
"override-soft-hard-with-single": {Single: 410},
|
||||||
"dont-override": &types.UlimitsConfig{Single: 500},
|
"dont-override": {Single: 500},
|
||||||
"add": &types.UlimitsConfig{Single: 610},
|
"add": {Single: 610},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1060,24 +1060,24 @@ func TestMergeServiceNetworkConfig(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
base := map[string]*types.ServiceNetworkConfig{
|
base := map[string]*types.ServiceNetworkConfig{
|
||||||
"override-aliases": &types.ServiceNetworkConfig{
|
"override-aliases": {
|
||||||
Aliases: []string{"100", "101"},
|
Aliases: []string{"100", "101"},
|
||||||
Ipv4Address: "127.0.0.1",
|
Ipv4Address: "127.0.0.1",
|
||||||
Ipv6Address: "0:0:0:0:0:0:0:1",
|
Ipv6Address: "0:0:0:0:0:0:0:1",
|
||||||
},
|
},
|
||||||
"dont-override": &types.ServiceNetworkConfig{
|
"dont-override": {
|
||||||
Aliases: []string{"200", "201"},
|
Aliases: []string{"200", "201"},
|
||||||
Ipv4Address: "127.0.0.2",
|
Ipv4Address: "127.0.0.2",
|
||||||
Ipv6Address: "0:0:0:0:0:0:0:2",
|
Ipv6Address: "0:0:0:0:0:0:0:2",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
override := map[string]*types.ServiceNetworkConfig{
|
override := map[string]*types.ServiceNetworkConfig{
|
||||||
"override-aliases": &types.ServiceNetworkConfig{
|
"override-aliases": {
|
||||||
Aliases: []string{"110", "111"},
|
Aliases: []string{"110", "111"},
|
||||||
Ipv4Address: "127.0.1.1",
|
Ipv4Address: "127.0.1.1",
|
||||||
Ipv6Address: "0:0:0:0:0:0:1:1",
|
Ipv6Address: "0:0:0:0:0:0:1:1",
|
||||||
},
|
},
|
||||||
"add": &types.ServiceNetworkConfig{
|
"add": {
|
||||||
Aliases: []string{"310", "311"},
|
Aliases: []string{"310", "311"},
|
||||||
Ipv4Address: "127.0.3.1",
|
Ipv4Address: "127.0.3.1",
|
||||||
Ipv6Address: "0:0:0:0:0:0:3:1",
|
Ipv6Address: "0:0:0:0:0:0:3:1",
|
||||||
|
@ -1089,17 +1089,17 @@ func TestMergeServiceNetworkConfig(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
base,
|
base,
|
||||||
map[string]*types.ServiceNetworkConfig{
|
map[string]*types.ServiceNetworkConfig{
|
||||||
"override-aliases": &types.ServiceNetworkConfig{
|
"override-aliases": {
|
||||||
Aliases: []string{"110", "111"},
|
Aliases: []string{"110", "111"},
|
||||||
Ipv4Address: "127.0.1.1",
|
Ipv4Address: "127.0.1.1",
|
||||||
Ipv6Address: "0:0:0:0:0:0:1:1",
|
Ipv6Address: "0:0:0:0:0:0:1:1",
|
||||||
},
|
},
|
||||||
"dont-override": &types.ServiceNetworkConfig{
|
"dont-override": {
|
||||||
Aliases: []string{"200", "201"},
|
Aliases: []string{"200", "201"},
|
||||||
Ipv4Address: "127.0.0.2",
|
Ipv4Address: "127.0.0.2",
|
||||||
Ipv6Address: "0:0:0:0:0:0:0:2",
|
Ipv6Address: "0:0:0:0:0:0:0:2",
|
||||||
},
|
},
|
||||||
"add": &types.ServiceNetworkConfig{
|
"add": {
|
||||||
Aliases: []string{"310", "311"},
|
Aliases: []string{"310", "311"},
|
||||||
Ipv4Address: "127.0.3.1",
|
Ipv4Address: "127.0.3.1",
|
||||||
Ipv6Address: "0:0:0:0:0:0:3:1",
|
Ipv6Address: "0:0:0:0:0:0:3:1",
|
||||||
|
|
Loading…
Reference in New Issue