GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( be5676...789770 )
by
unknown
09:31
created

credentials.TestURLCredential_updateCredential   A

Complexity

Conditions 3

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 9
nop 1
dl 0
loc 13
rs 9.95
c 0
b 0
f 0
1
package credentials
2
3
import (
4
	"errors"
5
	"net/http"
6
	"testing"
7
8
	"github.com/stretchr/testify/assert"
9
)
10
11
func TestURLCredential_updateCredential(t *testing.T) {
12
	URLCredential := newURLCredential("http://127.0.0.1")
13
	hookDo = func(fn func(req *http.Request) (*http.Response, error)) func(req *http.Request) (*http.Response, error) {
14
		return func(req *http.Request) (*http.Response, error) {
15
			return mockResponse(300, ``, errors.New("sdk test"))
16
		}
17
	}
18
	accesskeyId, err := URLCredential.GetAccessKeyId()
19
	// assert.NotNil(t, err)
20
	assert.Equal(t, "refresh Ecs sts token err: sdk test", err.Error())
21
	assert.Equal(t, "", *accesskeyId)
22
23
	assert.Equal(t, "credential_uri", *URLCredential.GetType())
24
}
25