Skip to content

Commit

Permalink
Add FAILED_DEPLOY job to acceptance tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething committed Oct 12, 2023
1 parent ce3078b commit e75d397
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions digitalocean/app/resource_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ func TestAccDigitalOceanApp_Job(t *testing.T) {
"digitalocean_app.foobar", "spec.0.job.1.log_destination.0.datadog.0.endpoint", "https://example.com"),
resource.TestCheckResourceAttr(
"digitalocean_app.foobar", "spec.0.job.1.log_destination.0.datadog.0.api_key", "test-api-key"),
resource.TestCheckResourceAttr(
"digitalocean_app.foobar", "spec.0.job.2.name", "example-failed-job"),
resource.TestCheckResourceAttr(
"digitalocean_app.foobar", "spec.0.job.2.kind", "FAILED_DEPLOY"),
),
},
},
Expand Down Expand Up @@ -1189,10 +1193,6 @@ resource "digitalocean_app" "foobar" {
repo_clone_url = "https://github.com/digitalocean/sample-golang.git"
branch = "main"
}
routes {
path = "/"
}
}
job {
Expand All @@ -1217,6 +1217,21 @@ resource "digitalocean_app" "foobar" {
}
}
}
job {
name = "example-failed-job"
instance_count = 1
instance_size_slug = "basic-xxs"
kind = "FAILED_DEPLOY"
run_command = "echo 'This is a failed deploy job.'"
image {
registry_type = "DOCKER_HUB"
registry = "frolvlad"
repository = "alpine-bash"
tag = "latest"
}
}
}
}`

Expand Down

0 comments on commit e75d397

Please sign in to comment.