Commit Graph

7 Commits

Author SHA1 Message Date
Roman Mazur
3f5239b07f
Remove mochainon dependnecy
Change-type: patch
Signed-off-by: Roman Mazur <roman@balena.io>
2019-06-19 23:31:58 +03:00
Cameron Diver
0fa47f635b
fix: Correctly handle multiple hosts ports pointing to a container port
When assigning multiple host ports to a single container port before
this change, the supervisor would incorrectly take only the first host
port into consideration. This change makes it so that every host port
per container port is considered.

Closes: #986
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-25 13:48:04 +01:00
Cameron Diver
f3264862ca
fix: Normalize ports from compose file on instantiation
Adjacent ports are always grouped together by docker when reporting the
container state (from an inspect), so adjacent ports defined in the
compose file would not match as they would not have been normalized.

We make sure to always normalize the input port configuration, so that
it will match the docker output (if it should).

We also don't sort in the fromComposePorts function anymore as that is
handled by the normalize function.

Closes: #897
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-08 15:14:07 +00:00
Cameron Diver
dc34025545
refactor: Generate and normalise PortMaps from compose ports in-class
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-01-02 12:19:30 +00:00
Cameron Diver
e82749e63a
tests: Add test case for ascending ports issue
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-01-02 11:31:25 +00:00
Cameron Diver
67b5503ac4
Fix: Change import of ports module to be extensionless in tests
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-09-03 09:39:06 -07:00
Cameron Diver
4027d286d1
Add tests for new port module
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-25 09:46:07 +01:00