Skip to content

Commit fd32027

Browse files
committed
add test
1 parent b27a57b commit fd32027

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/provider/route_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ func TestConvertRoute(t *testing.T) {
166166
EnableGoogleCloudServerlessAuthentication: types.BoolValue(true),
167167
TLSCustomCAKeyPairID: types.StringValue("custom-ca-1"),
168168
KubernetesServiceAccountTokenFile: types.StringValue("/path/to/token"),
169+
BearerTokenFormat: types.StringValue("idp_access_token"),
170+
IDPAccessTokenAllowedAudiences: types.ListValueMust(types.StringType, []attr.Value{
171+
types.StringValue("X"), types.StringValue("Y"), types.StringValue("Z"),
172+
}),
169173
}
170174

171175
actual, diag := provider.ConvertRouteToPB(context.Background(), &input)
@@ -191,6 +195,10 @@ func TestConvertRoute(t *testing.T) {
191195
EnableGoogleCloudServerlessAuthentication: true,
192196
TlsCustomCaKeyPairId: P("custom-ca-1"),
193197
KubernetesServiceAccountTokenFile: P("/path/to/token"),
198+
BearerTokenFormat: pb.BearerTokenFormat_BEARER_TOKEN_FORMAT_IDP_ACCESS_TOKEN.Enum(),
199+
IdpAccessTokenAllowedAudiences: &pb.Route_StringList{
200+
Values: []string{"X", "Y", "Z"},
201+
},
194202
}
195203

196204
if diff := cmp.Diff(expected, actual, protocmp.Transform()); diff != "" {

0 commit comments

Comments
 (0)