fix resource constraint specs
This commit is contained in:
parent
72c86a62c0
commit
1f739d31da
|
@ -44,15 +44,15 @@ func TestAccDockerContainer_customized(t *testing.T) {
|
|||
return fmt.Errorf("Container has wrong restart policy: %s", c.HostConfig.RestartPolicy.Name)
|
||||
}
|
||||
|
||||
if c.HostConfig.Memory != (128 * 1024 * 1024) {
|
||||
if c.HostConfig.Memory != (512 * 1024 * 1024) {
|
||||
return fmt.Errorf("Container has wrong memory setting: %d", c.HostConfig.Memory)
|
||||
}
|
||||
|
||||
if c.HostConfig.MemorySwap != (128 * 1024 * 1024) {
|
||||
return fmt.Errorf("Container has wrong memory swap setting: %d", c.HostConfig.Memory)
|
||||
if c.HostConfig.MemorySwap != (2048 * 1024 * 1024) {
|
||||
return fmt.Errorf("Container has wrong memory swap setting: %d", c.HostConfig.MemorySwap)
|
||||
}
|
||||
|
||||
if c.HostConfig.CPUShares != 512 {
|
||||
if c.HostConfig.CPUShares != 32 {
|
||||
return fmt.Errorf("Container has wrong cpu shares setting: %d", c.HostConfig.CPUShares)
|
||||
}
|
||||
|
||||
|
@ -143,9 +143,9 @@ resource "docker_container" "foo" {
|
|||
entrypoint = ["/bin/bash", "-c", "ping localhost"]
|
||||
restart = "on-failure"
|
||||
max_retry_count = 5
|
||||
memory = 128
|
||||
memory_swap = 128
|
||||
cpu_shares = 512
|
||||
memory = 512
|
||||
memory_swap = 2048
|
||||
cpu_shares = 32
|
||||
labels {
|
||||
env = "prod"
|
||||
role = "test"
|
||||
|
|
Loading…
Reference in New Issue