Pass namespace properly in client.ExchangeToken.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer
2020-09-22 10:03:32 -05:00
parent 381fd51e13
commit 481308215d
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -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,
+2 -1
View File
@@ -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",