... | ... |
@@ -78,7 +78,7 @@ func MergeConfig(userConf, imageConf *Config) { |
78 | 78 |
imageNat, _ := parseNat(imagePortSpec) |
79 | 79 |
for _, userPortSpec := range userConf.PortSpecs { |
80 | 80 |
userNat, _ := parseNat(userPortSpec) |
81 |
- if imageNat.Proto == userNat.Proto && imageNat.Frontend == userNat.Frontend { |
|
81 |
+ if imageNat.Proto == userNat.Proto && imageNat.Backend == userNat.Backend { |
|
82 | 82 |
found = true |
83 | 83 |
} |
84 | 84 |
} |
... | ... |
@@ -148,7 +148,7 @@ func TestMergeConfig(t *testing.T) { |
148 | 148 |
volumesUser["/test3"] = struct{}{} |
149 | 149 |
configUser := &Config{ |
150 | 150 |
Dns: []string{"3.3.3.3"}, |
151 |
- PortSpecs: []string{"2222:3333", "3333:3333"}, |
|
151 |
+ PortSpecs: []string{"3333:2222", "3333:3333"}, |
|
152 | 152 |
Env: []string{"VAR2=3", "VAR3=3"}, |
153 | 153 |
Volumes: volumesUser, |
154 | 154 |
} |
... | ... |
@@ -165,11 +165,11 @@ func TestMergeConfig(t *testing.T) { |
165 | 165 |
} |
166 | 166 |
|
167 | 167 |
if len(configUser.PortSpecs) != 3 { |
168 |
- t.Fatalf("Expected 3 portSpecs, 1111:1111, 2222:3333 and 3333:3333, found %d", len(configUser.PortSpecs)) |
|
168 |
+ t.Fatalf("Expected 3 portSpecs, 1111:1111, 3333:2222 and 3333:3333, found %d", len(configUser.PortSpecs)) |
|
169 | 169 |
} |
170 | 170 |
for _, portSpecs := range configUser.PortSpecs { |
171 |
- if portSpecs != "1111:1111" && portSpecs != "2222:3333" && portSpecs != "3333:3333" { |
|
172 |
- t.Fatalf("Expected 1111:1111 or 2222:3333 or 3333:3333, found %s", portSpecs) |
|
171 |
+ if portSpecs != "1111:1111" && portSpecs != "3333:2222" && portSpecs != "3333:3333" { |
|
172 |
+ t.Fatalf("Expected 1111:1111 or 3333:2222 or 3333:3333, found %s", portSpecs) |
|
173 | 173 |
} |
174 | 174 |
} |
175 | 175 |
if len(configUser.Env) != 3 { |