File tree 1 file changed +12
-1
lines changed
cmd/cue/cmd/testdata/script
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,15 @@ oauthregistry immediate-success
6
6
7
7
exec cue login
8
8
stdout 'open:.*user_code=user-code'
9
- grep 'secret-access-token' cueconfig/logins.json
9
+
10
+ # Ensure that only one token is stored.
11
+ grep -count=1 '"registries": {' cueconfig/logins.json
12
+ grep -count=1 '"access_token"' cueconfig/logins.json
13
+
14
+ # Ensure the contents of the token look correct.
15
+ grep -count=1 '"access_token": "secret-access-token"' cueconfig/logins.json
16
+ grep -count=1 '"token_type": "Bearer"' cueconfig/logins.json
17
+ # TODO(mvdan): oauthregistry does not provide expires_in correctly.
18
+ ! grep '"expiry": ' cueconfig/logins.json
19
+ # oauthregistry does not give a refresh token, and we use encoding/json's omitempty.
20
+ ! grep '"refresh_token"' cueconfig/logins.json
You can’t perform that action at this time.
0 commit comments