mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone. - Move windows partition isolation detection to the client, so the driver doesn't use external types. Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
parent
747dccde41
commit
7ac4232e70
65 changed files with 732 additions and 686 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/runconfig"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
)
|
||||
|
||||
func TestAdjustCPUShares(t *testing.T) {
|
||||
|
@ -21,8 +21,8 @@ func TestAdjustCPUShares(t *testing.T) {
|
|||
root: tmp,
|
||||
}
|
||||
|
||||
hostConfig := &runconfig.HostConfig{
|
||||
Resources: runconfig.Resources{CPUShares: linuxMinCPUShares - 1},
|
||||
hostConfig := &container.HostConfig{
|
||||
Resources: container.Resources{CPUShares: linuxMinCPUShares - 1},
|
||||
}
|
||||
daemon.adaptContainerSettings(hostConfig, true)
|
||||
if hostConfig.CPUShares != linuxMinCPUShares {
|
||||
|
@ -59,8 +59,8 @@ func TestAdjustCPUSharesNoAdjustment(t *testing.T) {
|
|||
root: tmp,
|
||||
}
|
||||
|
||||
hostConfig := &runconfig.HostConfig{
|
||||
Resources: runconfig.Resources{CPUShares: linuxMinCPUShares - 1},
|
||||
hostConfig := &container.HostConfig{
|
||||
Resources: container.Resources{CPUShares: linuxMinCPUShares - 1},
|
||||
}
|
||||
daemon.adaptContainerSettings(hostConfig, false)
|
||||
if hostConfig.CPUShares != linuxMinCPUShares-1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue