mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
runconfig: split resources into a struct
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
c1f11f8144
commit
1a0b483e02
4 changed files with 79 additions and 61 deletions
|
@ -22,7 +22,7 @@ func TestAdjustCPUShares(t *testing.T) {
|
|||
}
|
||||
|
||||
hostConfig := &runconfig.HostConfig{
|
||||
CPUShares: linuxMinCPUShares - 1,
|
||||
Resources: runconfig.Resources{CPUShares: linuxMinCPUShares - 1},
|
||||
}
|
||||
daemon.adaptContainerSettings(hostConfig, true)
|
||||
if hostConfig.CPUShares != linuxMinCPUShares {
|
||||
|
@ -60,7 +60,7 @@ func TestAdjustCPUSharesNoAdjustment(t *testing.T) {
|
|||
}
|
||||
|
||||
hostConfig := &runconfig.HostConfig{
|
||||
CPUShares: linuxMinCPUShares - 1,
|
||||
Resources: runconfig.Resources{CPUShares: linuxMinCPUShares - 1},
|
||||
}
|
||||
daemon.adaptContainerSettings(hostConfig, false)
|
||||
if hostConfig.CPUShares != linuxMinCPUShares-1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue