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

Merge @bwJuniper's test enhancement into ongoing routing-zone work #668

Merged
merged 2 commits into from
May 24, 2024
Merged
Changes from all commits
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
7 changes: 7 additions & 0 deletions apstra/resource_datacenter_routing_zone_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
routing_policy_id = %s
import_route_targets = %s
export_route_targets = %s
junos_evpn_irb_mode = %s
}
`
)
Expand All @@ -41,6 +42,7 @@ type testRoutingZone struct {
routingPolicy string
importRTs []string
exportRTs []string
irbMode string
}

func (o testRoutingZone) render(bpId apstra.ObjectId, rType, rName string) string {
Expand All @@ -55,6 +57,7 @@ func (o testRoutingZone) render(bpId apstra.ObjectId, rType, rName string) strin
stringOrNull(o.routingPolicy),
stringSetOrNull(o.importRTs),
stringSetOrNull(o.exportRTs),
stringOrNull(o.irbMode),
)
}

Expand Down Expand Up @@ -107,6 +110,10 @@ func (o testRoutingZone) testChecks(t testing.TB, bpId apstra.ObjectId, rType, r
}
}

if o.irbMode != "" {
result.append(t, "TestCheckResourceAttr", "junos_evpn_irb_mode", o.irbMode)
}

return result
}

Expand Down
Loading