Pass namespace properly in client.ExchangeToken.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
381fd51e13
commit
481308215d
@ -30,6 +30,9 @@ func ExchangeToken(ctx context.Context, namespace string, idp corev1.TypedLocalO
|
||||
}
|
||||
|
||||
resp, err := client.LoginV1alpha1().TokenCredentialRequests(namespace).Create(ctx, &v1alpha1.TokenCredentialRequest{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: namespace,
|
||||
},
|
||||
Spec: v1alpha1.TokenCredentialRequestSpec{
|
||||
Token: token,
|
||||
IdentityProvider: idp,
|
||||
|
@ -100,7 +100,8 @@ func TestExchangeToken(t *testing.T) {
|
||||
"kind": "TokenCredentialRequest",
|
||||
"apiVersion": "login.pinniped.dev/v1alpha1",
|
||||
"metadata": {
|
||||
"creationTimestamp": null
|
||||
"creationTimestamp": null,
|
||||
"namespace": "test-namespace"
|
||||
},
|
||||
"spec": {
|
||||
"token": "test-token",
|
||||
|
Loading…
Reference in New Issue
Block a user