ComputeUrlMapUrlMapTest class
One test[] entry. Each test states "a request to host+path should
resolve to service" and is evaluated by GCP at apply time -- if
the routing pipeline produces a different service, the apply FAILS.
Effectively a contract test for the URL map's routing table.
For redirect tests, set expectedRedirectResponseCode (and / or expectedOutputUrl) instead of (or in addition to) service.
- Annotations
-
- @immutable
Constructors
-
ComputeUrlMapUrlMapTest({required TfArg<
String> host, required TfArg<String> path, TfArg<String> ? service, TfArg<String> ? description, TfArg<String> ? expectedOutputUrl, TfArg<int> ? expectedRedirectResponseCode, List<ComputeUrlMapUrlMapTestHeader> ? headers}) -
const
Properties
-
description
→ TfArg<
String> ? -
Free-form description.
final
-
expectedOutputUrl
→ TfArg<
String> ? -
Expected redirected URL when the routing pipeline produces a
redirect.
final
-
expectedRedirectResponseCode
→ TfArg<
int> ? -
Expected HTTP redirect status code (e.g.
301,302).final - hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ List<
ComputeUrlMapUrlMapTestHeader> ? -
Extra request headers for header-aware route rules.
final
-
host
→ TfArg<
String> -
Request
Host:header for the simulated request.final -
path
→ TfArg<
String> -
Request path for the simulated request.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
service
→ TfArg<
String> ? -
Backend self-link the simulated request should resolve to. Optional
when expectedRedirectResponseCode is set (a redirect contract test
does not resolve to a backend).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toArgMap(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited