mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-01-04 13:59:36 -05:00
fix resource constraint specs
This commit is contained in:
parent
38b1e1ce26
commit
f6e4608a35
1 changed files with 7 additions and 7 deletions
|
|
@ -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 a new issue