e2e: Fix the token check to actually fail on expiration
This commit is contained in:
parent
ebcd838501
commit
5c1be3265b
|
|
@ -557,9 +557,9 @@ func (e *env) checkGitHubToken(t *testing.T, tok string) error {
|
|||
c := github.NewClient(&http.Client{Transport: transport})
|
||||
aa, res, err := c.Octocat(context.Background(), "hello")
|
||||
if err != nil {
|
||||
b, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
t.Logf("%v", err)
|
||||
b, ioerr := io.ReadAll(res.Body)
|
||||
if ioerr != nil {
|
||||
t.Logf("%v", ioerr)
|
||||
return err
|
||||
}
|
||||
t.Logf(string(b))
|
||||
|
|
@ -569,9 +569,9 @@ func (e *env) checkGitHubToken(t *testing.T, tok string) error {
|
|||
t.Logf("%s", aa)
|
||||
|
||||
if _, res, err := c.Actions.CreateRegistrationToken(ctx, e.testOrg, e.testOrgRepo); err != nil {
|
||||
b, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
t.Logf("%v", err)
|
||||
b, ioerr := io.ReadAll(res.Body)
|
||||
if ioerr != nil {
|
||||
t.Logf("%v", ioerr)
|
||||
return err
|
||||
}
|
||||
t.Logf(string(b))
|
||||
|
|
|
|||
Loading…
Reference in New Issue