forked from hashicorp/levant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hashicorp#280 from pmcatominey/integration
test: add count and canary integration tests
- Loading branch information
Showing
8 changed files
with
271 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# test alloc error with a command failure | ||
|
||
job "[[.job_name]]" { | ||
datacenters = ["dc1"] | ||
type = "service" | ||
update { | ||
max_parallel = 1 | ||
min_healthy_time = "10s" | ||
healthy_deadline = "15s" | ||
progress_deadline = "20s" | ||
} | ||
|
||
group "test" { | ||
count = 1 | ||
restart { | ||
attempts = 1 | ||
interval = "10s" | ||
delay = "5s" | ||
mode = "fail" | ||
} | ||
ephemeral_disk { | ||
size = 300 | ||
} | ||
task "alpine" { | ||
driver = "docker" | ||
config { | ||
image = "alpine" | ||
command = "badcommandname" | ||
} | ||
resources { | ||
cpu = 100 | ||
memory = 128 | ||
network { | ||
mbits = 10 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# tests a canary deployment | ||
|
||
job "[[.job_name]]" { | ||
datacenters = ["dc1"] | ||
type = "service" | ||
update { | ||
max_parallel = 1 | ||
min_healthy_time = "2s" | ||
healthy_deadline = "1m" | ||
auto_revert = true | ||
canary = 1 | ||
} | ||
|
||
group "test" { | ||
count = 1 | ||
restart { | ||
attempts = 10 | ||
interval = "5m" | ||
delay = "25s" | ||
mode = "delay" | ||
} | ||
ephemeral_disk { | ||
size = 300 | ||
} | ||
task "alpine" { | ||
driver = "docker" | ||
config { | ||
image = "alpine" | ||
command = "tail" | ||
args = [ | ||
"-f", "/dev/null" | ||
] | ||
} | ||
env { | ||
version = "[[ .env_version ]]" | ||
} | ||
resources { | ||
cpu = 100 | ||
memory = 128 | ||
network { | ||
mbits = 10 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# tests a healthy deployment with a count | ||
|
||
job "[[.job_name]]" { | ||
datacenters = ["dc1"] | ||
type = "service" | ||
update { | ||
max_parallel = 1 | ||
min_healthy_time = "10s" | ||
healthy_deadline = "1m" | ||
auto_revert = true | ||
} | ||
|
||
group "test" { | ||
count = [[.count]] | ||
restart { | ||
attempts = 10 | ||
interval = "5m" | ||
delay = "25s" | ||
mode = "delay" | ||
} | ||
ephemeral_disk { | ||
size = 300 | ||
} | ||
task "alpine" { | ||
driver = "docker" | ||
config { | ||
image = "alpine" | ||
command = "tail" | ||
args = [ | ||
"-f", "/dev/null" | ||
] | ||
} | ||
resources { | ||
cpu = 100 | ||
memory = 128 | ||
network { | ||
mbits = 10 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters