Skip to content

Commit

Permalink
app: update datasource tests for ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething committed Oct 19, 2023
1 parent bf6c465 commit 4b23f65
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions digitalocean/app/datasource_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ func TestAccDataSourceDigitalOceanApp_Basic(t *testing.T) {
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.0.instance_size_slug", "basic-xxs"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.0.routes.0.path", "/"),
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.0.match.0.path.0.prefix", "/"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.0.component.0.name", "go-service"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.0.git.0.repo_clone_url",
"https://github.com/digitalocean/sample-golang.git"),
Expand Down Expand Up @@ -81,11 +83,19 @@ func TestAccDataSourceDigitalOceanApp_Basic(t *testing.T) {
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.0.name", "go-service"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.0.routes.0.path", "/go"),
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.0.match.0.path.0.prefix", "/go"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.0.component.0.preserve_path_prefix", "false"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.0.component.0.name", "go-service"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.1.name", "python-service"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.service.1.routes.0.path", "/python"),
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.1.match.0.path.0.prefix", "/python"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.1.component.0.preserve_path_prefix", "true"),
resource.TestCheckResourceAttr(
"data.digitalocean_app.foobar", "spec.0.ingress.0.rule.1.component.0.name", "python-service"),
),
},
},
Expand Down

0 comments on commit 4b23f65

Please sign in to comment.