Add support for swappiness constraint
Run a service using `docker run --memory-swappiness=0` (see https://docs.docker.com/engine/reference/run/) refs #2383 Signed-off-by: Jean-François Roche <jfroche@affinitic.be>
This commit is contained in:
parent
13bcd85eb3
commit
d824cb9b06
7 changed files with 31 additions and 2 deletions
|
|
@ -1271,6 +1271,24 @@ class ConfigTest(unittest.TestCase):
|
|||
}
|
||||
]
|
||||
|
||||
def test_swappiness_option(self):
|
||||
actual = config.load(build_config_details({
|
||||
'version': '2',
|
||||
'services': {
|
||||
'web': {
|
||||
'image': 'alpine',
|
||||
'mem_swappiness': 10,
|
||||
}
|
||||
}
|
||||
}))
|
||||
assert actual.services == [
|
||||
{
|
||||
'name': 'web',
|
||||
'image': 'alpine',
|
||||
'mem_swappiness': 10,
|
||||
}
|
||||
]
|
||||
|
||||
def test_merge_service_dicts_from_files_with_extends_in_base(self):
|
||||
base = {
|
||||
'volumes': ['.:/app'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue