Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apps: Add support for ingress for component routing, rewrites, and redirects. #1053

Merged
merged 5 commits into from
Oct 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
app: update datasource tests for ingress
  • Loading branch information
andrewsomething committed Oct 19, 2023
commit 4b23f65a39bd8b855dc10f7822bf7bccf0020d4f
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
Loading